From b85ad52ed41d2f96f389fb95a2a00e529e24cb07 Mon Sep 17 00:00:00 2001 From: oysteini Date: Sun, 6 Mar 2011 17:42:25 +0000 Subject: [PATCH] Fikset en feil i lesing av dictionary-verdier i fileformat.py. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Den håndterte ikke tomme verdier. Nå gjør den det. --- python/web/library/fileformat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/web/library/fileformat.py b/python/web/library/fileformat.py index b189217..74e3b47 100644 --- a/python/web/library/fileformat.py +++ b/python/web/library/fileformat.py @@ -64,6 +64,8 @@ def read_field_value_int(val): def read_field_value_dict(val): d = {} + if val.strip() == '': + return d for line in val.strip().split('\n'): key, value = line.strip().split(' ', 1) if key in d: