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

Fix in fileformat.py: Empty fields are None when reading.

This commit is contained in:
Øystein Ingmar Skartsæterhagen 2011-10-08 19:49:28 +00:00
parent 9e84d0cfcd
commit a9f1ac6a66
1 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,8 @@ class CommitFormatSyntaxError(Exception):
pass
def read_field_value_str(val):
if val.strip() == '':
return None
return '\n'.join(map(lambda x: x.strip(), val.split('\n'))).strip()
def read_field_value_int(val):