From a863342caf7da9a1c0430549c1ea1e53408b34af Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Tue, 7 Jul 2015 14:25:06 +0000 Subject: [PATCH] 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 --- neutron/api/api_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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): -- 2.45.2