Fikset noen problemer i fileformat.py.
Ting som ikke var strenger måtte konverteres.
This commit is contained in:
parent
add8e4fd65
commit
0106cb2453
|
@ -54,6 +54,9 @@ def read_action(lines):
|
||||||
|
|
||||||
def write_field_value_str(val):
|
def write_field_value_str(val):
|
||||||
lines = ''
|
lines = ''
|
||||||
|
if not val:
|
||||||
|
val = ''
|
||||||
|
val = unicode(val)
|
||||||
value_lines = val.split('\n')
|
value_lines = val.split('\n')
|
||||||
for l in value_lines:
|
for l in value_lines:
|
||||||
lines += ' ' + l + '\n'
|
lines += ' ' + l + '\n'
|
||||||
|
@ -63,13 +66,13 @@ def write_field_value_dict(val):
|
||||||
lines = '\n'
|
lines = '\n'
|
||||||
for (key,values) in val.items():
|
for (key,values) in val.items():
|
||||||
for single_value in values:
|
for single_value in values:
|
||||||
lines += ' ' + key + ' ' + single_value + '\n'
|
lines += ' ' + key + ' ' + unicode(single_value) + '\n'
|
||||||
return lines
|
return lines
|
||||||
|
|
||||||
def write_field_value_list(val):
|
def write_field_value_list(val):
|
||||||
lines = ''
|
lines = ''
|
||||||
for single_value in val:
|
for single_value in val:
|
||||||
lines += ' ' + single_value
|
lines += ' ' + unicode(single_value)
|
||||||
return lines
|
return lines
|
||||||
|
|
||||||
def write_action(d):
|
def write_action(d):
|
||||||
|
|
Reference in New Issue