summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2020-08-06 10:47:44 +0200
committerEmilio Pozuelo Monfort <pochu@debian.org>2020-08-06 11:02:28 +0200
commit8b4f8b7984d3d132d7383e797c938f779c625427 (patch)
tree8af40659eec0506dda6481aa24b0a61d38087d90 /bin
parent2ab419f3c2d6dbd4d56b5f07440595e8105cd7ab (diff)
tracker_service: convert maps to lists for make_list
Otherwise under python 3, make_list will fail with empty maps as the map object will evaluate to true even if it's empty. We could cast to a list in make_list before evaluating it, but then we would need to ensure that we're receiving a valid type. This is probably simpler.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tracker_service.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/tracker_service.py b/bin/tracker_service.py
index 88295050a7..cc0e0e4d6b 100755
--- a/bin/tracker_service.py
+++ b/bin/tracker_service.py
@@ -519,7 +519,7 @@ data source.""")],
bugs = n.bugs
bugs.sort()
bugs = make_list(
- map(lambda x: self.make_debian_bug(url, x), bugs))
+ list(map(lambda x: self.make_debian_bug(url, x), bugs)))
if n.bug_origin:
origin = self.make_xref(url, n.bug_origin)
else:
@@ -1593,12 +1593,12 @@ Debian bug number.'''),
return A(url.scriptRelative(name), name)
def make_xref_list(self, url, lst, separator=', '):
- return make_list(map(lambda x: self.make_xref(url, x), lst), separator)
+ return make_list(list(map(lambda x: self.make_xref(url, x), lst)), separator)
def make_debian_bug(self, url, debian):
return A(self.url_debian_bug(url, debian), str(debian))
def make_debian_bug_list(self, url, lst):
- return make_list(map(lambda x: self.make_debian_bug(url, x), lst))
+ return make_list(list(map(lambda x: self.make_debian_bug(url, x), lst)))
def make_cve_ref(self, url, cve, name=None):
if name is None:

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