diff options
author | Jasper St. Pierre <[email protected]> | 2012-06-01 01:45:19 -0400 |
---|---|---|
committer | Alexei Sorokin <[email protected]> | 2016-08-22 23:03:32 +0300 |
commit | 2f6ec7aabdeaf6575f93dbe71d08df98aa13cda2 (patch) | |
tree | 67b99cac1b90cb78266c31f0aad20ae630398e89 /Mozo/util.py | |
parent | fb0de4c06f32a030b183c58d25e4d77846cd3b5e (diff) | |
download | mozo-2f6ec7aabdeaf6575f93dbe71d08df98aa13cda2.tar.bz2 mozo-2f6ec7aabdeaf6575f93dbe71d08df98aa13cda2.tar.xz |
remove dumb explicit checks
replace "== None" with "is None",
replace "== False" with "not"
Diffstat (limited to 'Mozo/util.py')
-rw-r--r-- | Mozo/util.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Mozo/util.py b/Mozo/util.py index 2688c4b..49d9d4a 100644 --- a/Mozo/util.py +++ b/Mozo/util.py @@ -132,7 +132,7 @@ def getUserMenuXml(tree): def getIcon(item, for_properties=False): pixbuf, path = None, None - if item == None: + if item is None: if for_properties: return None, None return None @@ -153,7 +153,7 @@ def getIcon(item, for_properties=False): path = iconName except: pass - if pixbuf == None: + if pixbuf is None: if for_properties: return None, None if item.get_type() == matemenu.TYPE_DIRECTORY: @@ -165,7 +165,7 @@ def getIcon(item, for_properties=False): path = icon_theme.lookup_icon(iconName, 24, 0).get_filename() except: return None - if pixbuf == None: + if pixbuf is None: return None if pixbuf.get_width() != 24 or pixbuf.get_height() != 24: pixbuf = pixbuf.scale_simple(24, 24, GdkPixbuf.InterpType.HYPER) |