From 8a578ffdb2b516a3d72e0a4a38c656f89e11b672 Mon Sep 17 00:00:00 2001 From: oysteini Date: Sun, 6 Mar 2011 10:42:41 +0000 Subject: [PATCH] =?UTF-8?q?Endret=20read=5Faction=20til=20=C3=A5=20ta=20in?= =?UTF-8?q?n=20en=20streng=20istedenfor=20en=20liste.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python/web/library/fileformat.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/web/library/fileformat.py b/python/web/library/fileformat.py index 8825164..400e227 100644 --- a/python/web/library/fileformat.py +++ b/python/web/library/fileformat.py @@ -70,7 +70,8 @@ def read_field_value_dict(val): def read_field_value_list(val): return val.strip().split(' ') -def read_action(lines): +def read_action(text): + lines = text.split('\n') d = {} lastfield = None for line in lines: @@ -101,7 +102,7 @@ def read_action(lines): return result def read_actionlist(text): - return map(lambda x: read_action(x.strip().split('\n')), + return map(lambda x: read_action(x.strip()), text.split('\n\n')) def write_field_value_str(val):