From 4d6c78cbfb1a0da32c5e1e30394ff253467346ac Mon Sep 17 00:00:00 2001 From: Bo Wang Date: Fri, 15 Jan 2016 01:55:52 +0800 Subject: [PATCH] Python3: Fix using dictionary keys() It will throw TypeError when you try to operate on dict.keys() like a list in python3. ref:https://docs.python.org/3/library/stdtypes.html#dictionary-view-objects Change-Id: I3f1173e74ddd589f3d363597bd1562299f92e93d --- sahara/utils/patches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sahara/utils/patches.py b/sahara/utils/patches.py index c1b1d11..756a46b 100644 --- a/sahara/utils/patches.py +++ b/sahara/utils/patches.py @@ -79,7 +79,7 @@ def patch_minidom_writexml(): writer.write(indent + "<" + self.tagName) attrs = self._get_attributes() - a_names = attrs.keys() + a_names = list(attrs.keys()) a_names.sort() for a_name in a_names: