[alacarte] Add python3 compatibility



commit 274d46d4061077da8c92236a98ba67f0df15703d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Aug 29 18:32:49 2013 -0400

    Add python3 compatibility

 Alacarte/MenuEditor.py |    2 +-
 Alacarte/util.py       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py
index 077b113..b07690c 100644
--- a/Alacarte/MenuEditor.py
+++ b/Alacarte/MenuEditor.py
@@ -41,7 +41,7 @@ class MenuEditor(object):
     def loadDOM(self):
         try:
             self.dom = xml.dom.minidom.parse(self.path)
-        except (IOError, xml.parsers.expat.ExpatError), e:
+        except (IOError, xml.parsers.expat.ExpatError) as e:
             self.dom = xml.dom.minidom.parseString(util.getUserMenuXml(self.tree))
         util.removeWhitespaceNodes(self.dom)
 
diff --git a/Alacarte/util.py b/Alacarte/util.py
index 2c35ca0..0d98d56 100644
--- a/Alacarte/util.py
+++ b/Alacarte/util.py
@@ -28,7 +28,7 @@ DESKTOP_GROUP = GLib.KEY_FILE_DESKTOP_GROUP
 KEY_FILE_FLAGS = GLib.KeyFileFlags.KEEP_COMMENTS | GLib.KeyFileFlags.KEEP_TRANSLATIONS
 
 def fillKeyFile(keyfile, items):
-    for key, item in items.iteritems():
+    for key, item in items.items():
         if item is None:
             continue
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]