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

Fikset noen problemer i fileformat.py.

Ting som ikke var strenger måtte konverteres.
This commit is contained in:
Øystein Ingmar Skartsæterhagen 2011-03-05 18:11:07 +00:00
parent add8e4fd65
commit 0106cb2453
1 changed files with 5 additions and 2 deletions

View File

@ -54,6 +54,9 @@ def read_action(lines):
def write_field_value_str(val):
lines = ''
if not val:
val = ''
val = unicode(val)
value_lines = val.split('\n')
for l in value_lines:
lines += ' ' + l + '\n'
@ -63,13 +66,13 @@ def write_field_value_dict(val):
lines = '\n'
for (key,values) in val.items():
for single_value in values:
lines += ' ' + key + ' ' + single_value + '\n'
lines += ' ' + key + ' ' + unicode(single_value) + '\n'
return lines
def write_field_value_list(val):
lines = ''
for single_value in val:
lines += ' ' + single_value
lines += ' ' + unicode(single_value)
return lines
def write_action(d):