From 7446c5954aa2ca2d0353a5a3e91f6f7e4b9b17e7 Mon Sep 17 00:00:00 2001 From: Anthony King Date: Tue, 6 May 2014 09:19:39 +0100 Subject: [PATCH] Use sorted() rather than .sort() dict.keys() produces a dict_keys object in Python 3, which does not support .sort(). Use sorted() which will give the same outcome. Change-Id: If6b33db07a31995b4e44959209d08d8fb74ae339 --- manifest_xml.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/manifest_xml.py b/manifest_xml.py index e2f58e62..23ff12e1 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -872,10 +872,8 @@ class XmlManifest(object): fromProjects = self.paths toProjects = manifest.paths - fromKeys = fromProjects.keys() - fromKeys.sort() - toKeys = toProjects.keys() - toKeys.sort() + fromKeys = sorted(fromProjects.keys()) + toKeys = sorted(toProjects.keys()) diff = {'added': [], 'removed': [], 'changed': [], 'unreachable': []}