summaryrefslogtreecommitdiff
path: root/trove/common/base_wsgi.py
diff options
context:
space:
mode:
authorBo Wang <bo.wang@easystack.cn>2016-01-15 01:30:33 +0800
committerBo Wang <bo.wang@easystack.cn>2016-01-15 01:30:33 +0800
commitccee26f1f299813c73c735c184e54ecdfdf1fd32 (patch)
treeb9e1dd18d895db7f204db8d1e667c8d49cf42013 /trove/common/base_wsgi.py
parent2349e192d778e1bb1ac1a260d145f074339872f6 (diff)
downloadtrove-ccee26f1f299813c73c735c184e54ecdfdf1fd32.tar.gz
Fix indexing of dict.keys() in python3
It will throw TypeError when you try to operate on dict.keys() like a list in python3. Partially implements: blueprint trove-python3 Change-Id: I6c01cc37fb248389e8cc769264ad045536ef1e54
Diffstat (limited to 'trove/common/base_wsgi.py')
-rw-r--r--trove/common/base_wsgi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/trove/common/base_wsgi.py b/trove/common/base_wsgi.py
index a15ed17f..75f3af04 100644
--- a/trove/common/base_wsgi.py
+++ b/trove/common/base_wsgi.py
@@ -471,7 +471,7 @@ class XMLDictSerializer(DictSerializer):
def default(self, data):
# We expect data to contain a single key which is the XML root.
- root_key = data.keys()[0]
+ root_key = list(data.keys())[0]
doc = minidom.Document()
node = self._to_xml_node(doc, self.metadata, root_key, data[root_key])