diff options
author | Emilio Pozuelo Monfort <pochu@debian.org> | 2020-08-06 10:47:44 +0200 |
---|---|---|
committer | Emilio Pozuelo Monfort <pochu@debian.org> | 2020-08-06 11:02:28 +0200 |
commit | ff2f0a7af1508f4cbd34912cf536b9caed0deae3 (patch) | |
tree | 53080c70cc619c242eccba9bfa4e3ea2931f81e9 /bin | |
parent | 1845f0296b82788ef28239c1fe857c1c98968c97 (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-x | bin/tracker_service.py | 6 |
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: |