# HG changeset patch # User Lars Kruse # Date 1503664351 -7200 # Node ID bfd7fc9a814e3e75ba476a18e50117650d6277ed # Parent 9841eef3f2e44d2db811c64c3bf985d750c9dc04 py3: replace list comprehension with for-loop due to scope The scope of the list comprehension variable 'x' will be limited to the list comprehension in python3. Thus switching to a full loop (without this scope restriction) in preparation for python3. diff -r 9841eef3f2e4 -r bfd7fc9a814e kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py Fri Aug 25 14:31:48 2017 +0200 +++ b/kallithea/controllers/pullrequests.py Fri Aug 25 14:32:31 2017 +0200 @@ -484,8 +484,9 @@ org_scm_instance = c.cs_repo.scm_instance # property with expensive cache invalidation check!!! try: - c.cs_ranges = [org_scm_instance.get_changeset(x) - for x in c.pull_request.revisions] + c.cs_ranges = [] + for x in c.pull_request.revisions: + c.cs_ranges.append(org_scm_instance.get_changeset(x)) except ChangesetDoesNotExistError: c.cs_ranges = [] h.flash(_('Revision %s not found in %s') % (x, c.cs_repo.repo_name),