Projects/worblehat-old
Projects
/
worblehat-old
Archived
12
0
Fork 0

Fikset en feil i lesing av dictionary-verdier i fileformat.py.

Den håndterte ikke tomme verdier.  Nå gjør den det.
This commit is contained in:
Øystein Ingmar Skartsæterhagen 2011-03-06 17:42:25 +00:00
parent 7716c61965
commit b85ad52ed4
1 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,8 @@ def read_field_value_int(val):
def read_field_value_dict(val): def read_field_value_dict(val):
d = {} d = {}
if val.strip() == '':
return d
for line in val.strip().split('\n'): for line in val.strip().split('\n'):
key, value = line.strip().split(' ', 1) key, value = line.strip().split(' ', 1)
if key in d: if key in d: