diff options
author | Brian May <brian@linuxpenguins.xyz> | 2019-06-17 17:56:11 +1000 |
---|---|---|
committer | Emilio Pozuelo Monfort <pochu@debian.org> | 2020-07-29 10:12:59 +0200 |
commit | 6e7da2121628be7d18a9af3dd087c78b2a0fc2b7 (patch) | |
tree | 9e607535addaa6221ecf3ab41880d832cf35ee73 /lib | |
parent | 6b1ca897f5493b7d2ce80c309ece42782c386b63 (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.py | 2 |
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',] |