1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 12:15:40 +01:00

postprocess.sublanguage.parse: in py3 map return an iterator but we want a list

fixes #444
This commit is contained in:
Johan Andersson 2016-09-07 17:31:14 +02:00
parent 86c5bd3776
commit 0cb152edef

View File

@ -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', '')