summaryrefslogtreecommitdiff
path: root/Mozo/MenuEditor.py
diff options
context:
space:
mode:
authorJasper St. Pierre <[email protected]>2012-06-01 01:45:19 -0400
committerAlexei Sorokin <[email protected]>2016-08-22 23:03:32 +0300
commit2f6ec7aabdeaf6575f93dbe71d08df98aa13cda2 (patch)
tree67b99cac1b90cb78266c31f0aad20ae630398e89 /Mozo/MenuEditor.py
parentfb0de4c06f32a030b183c58d25e4d77846cd3b5e (diff)
downloadmozo-2f6ec7aabdeaf6575f93dbe71d08df98aa13cda2.tar.bz2
mozo-2f6ec7aabdeaf6575f93dbe71d08df98aa13cda2.tar.xz
remove dumb explicit checks
replace "== None" with "is None", replace "== False" with "not"
Diffstat (limited to 'Mozo/MenuEditor.py')
-rw-r--r--Mozo/MenuEditor.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Mozo/MenuEditor.py b/Mozo/MenuEditor.py
index 0a8c5b0..4033a2b 100644
--- a/Mozo/MenuEditor.py
+++ b/Mozo/MenuEditor.py
@@ -188,7 +188,7 @@ class MenuEditor:
self.__undo.append(undo)
def getMenus(self, parent=None):
- if parent == None:
+ if parent is None:
yield self.applications.tree.root
yield self.settings.tree.root
else:
@@ -419,7 +419,7 @@ class MenuEditor:
else:
continue
elif item.get_type() == matemenu.TYPE_DIRECTORY:
- if item.get_desktop_file_path() == None:
+ if item.get_desktop_file_path() is None:
continue
file_path = os.path.join(util.getUserDirectoryPath(), os.path.split(item.get_desktop_file_path())[1])
if not os.path.isfile(file_path):
@@ -451,9 +451,9 @@ class MenuEditor:
return self.settings
def __findMenu(self, menu_id, parent=None):
- if parent == None:
+ if parent is None:
menu = self.__findMenu(menu_id, self.applications.tree.root)
- if menu != None:
+ if menu is not None:
return menu
else:
return self.__findMenu(menu_id, self.settings.tree.root)
@@ -466,7 +466,7 @@ class MenuEditor:
if item.menu_id == menu_id:
return item
menu = self.__findMenu(menu_id, item)
- if menu != None:
+ if menu is not None:
return menu
def __isVisible(self, item):
@@ -478,7 +478,7 @@ class MenuEditor:
elif menu == self.settings:
root = self.settings.visible_tree.root
if item.get_type() == matemenu.TYPE_DIRECTORY:
- if self.__findMenu(item.menu_id, root) == None:
+ if self.__findMenu(item.menu_id, root) is None:
return False
return True