From 0cb152edefbb22e0a47557dc4db05129154e223c Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Wed, 7 Sep 2016 17:31:14 +0200 Subject: [PATCH] postprocess.sublanguage.parse: in py3 map return an iterator but we want a list fixes #444 --- lib/svtplay_dl/postprocess/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/svtplay_dl/postprocess/__init__.py b/lib/svtplay_dl/postprocess/__init__.py index f767992..6e59f0b 100644 --- a/lib/svtplay_dl/postprocess/__init__.py +++ b/lib/svtplay_dl/postprocess/__init__.py @@ -29,8 +29,8 @@ class postprocess(object): lines = block.strip('-').split('\n') txt = '\r\n'.join(lines[2:]) return txt - return map(parse_block, - open(self).read().strip().replace('\r', '').split('\n\n')) + return list(map(parse_block, + open(self).read().strip().replace('\r', '').split('\n\n'))) def query(self): random_sentences = ' '.join(sample(parse(self),8)).replace('\r\n', '')