From: Cyril Roelandt Date: Tue, 7 Jul 2015 14:25:06 +0000 (+0000) Subject: Python3: cast the result of zip() to list X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a863342caf7da9a1c0430549c1ea1e53408b34af;p=openstack-build%2Fneutron-build.git Python3: cast the result of zip() to list The result of get_sorts was a 'zip object' in Python 3, and it was later used as a list, which fails. Just cast the result to a list to fix this issue. Change-Id: I12017f79cad92b1da4fe5f9939b38436db7219eb Blueprint: neutron-python3 --- diff --git a/neutron/api/api_common.py b/neutron/api/api_common.py index 778c40794..595c592bd 100644 --- a/neutron/api/api_common.py +++ b/neutron/api/api_common.py @@ -147,8 +147,8 @@ def get_sorts(request, attr_info): 'asc': constants.SORT_DIRECTION_ASC, 'desc': constants.SORT_DIRECTION_DESC}) raise exc.HTTPBadRequest(explanation=msg) - return zip(sort_keys, - [x == constants.SORT_DIRECTION_ASC for x in sort_dirs]) + return list(zip(sort_keys, + [x == constants.SORT_DIRECTION_ASC for x in sort_dirs])) def get_page_reverse(request):