summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--wikitrans/wikitoken.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/wikitrans/wikitoken.py b/wikitrans/wikitoken.py
index 0678a75..deedea8 100644
--- a/wikitrans/wikitoken.py
+++ b/wikitrans/wikitoken.py
@@ -122,7 +122,8 @@ class WikiContentNode(WikiNode):
if self.type == 'TEXT':
ret['content'] = self.content
elif isinstance(self.content, list):
- ret['content'] = map(lambda x: x.json_encode(), self.content)
+ ret['content'] = [x for x in
+ map(lambda x: x.json_encode(), self.content)]
elif isinstance(self.content, WikiNode):
ret['content'] = self.content.json_encode()
else:
@@ -150,7 +151,7 @@ class WikiSeqNode(WikiContentNode):
if not self.content:
ret['content'] = None
elif isinstance(self.content, list):
- ret['content'] = map(lambda x: x.json_encode(), self.content)
+ ret['content'] = [x for x in map(lambda x: x.json_encode(), self.content)]
elif isinstance(self.content, WikiNode):
ret['content'] = self.content.json_encode()
else:

Return to:

Send suggestions and report system problems to the System administrator.