summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrian May <brian@linuxpenguins.xyz>2019-06-17 17:56:11 +1000
committerEmilio Pozuelo Monfort <pochu@debian.org>2020-07-29 10:12:59 +0200
commitab1038c1c65e020c7b0a3a943119fe3d237b7ae8 (patch)
treec008c2414b2bf03fe80aa8fe8568f52fecf9bae9 /lib
parent26f04f79374b936584e2b907c3ba4bc991999af1 (diff)
Force map() to get evaluated as list
Under Python 3, map() doesn't return a list (as in Python 2), but must be evaluated before it can be used as a list.
Diffstat (limited to 'lib')
-rw-r--r--lib/python/debian_support.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/python/debian_support.py b/lib/python/debian_support.py
index b2e0d60956..00ffc89a58 100644
--- a/lib/python/debian_support.py
+++ b/lib/python/debian_support.py
@@ -572,7 +572,7 @@ def test():
assert readLinesSHA1(['1\n', '23\n']) \
== '14293c9bd646a15dc656eaf8fba95124020dfada'
- file_a = map(lambda x: "%d\n" % x, range(1, 18))
+ file_a = list(map(lambda x: "%d\n" % x, range(1, 18)))
file_b = ['0\n', '1\n', '<2>\n', '<3>\n', '4\n', '5\n', '7\n', '8\n',
'11\n', '12\n', '<13>\n', '14\n', '15\n', 'A\n', 'B\n', 'C\n',
'16\n', '17\n',]

© 2014-2024 Faster IT GmbH | imprint | privacy policy