From ccee26f1f299813c73c735c184e54ecdfdf1fd32 Mon Sep 17 00:00:00 2001 From: Bo Wang Date: Fri, 15 Jan 2016 01:30:33 +0800 Subject: 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 --- trove/common/base_wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'trove/common/base_wsgi.py') 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]) -- cgit v1.2.1