From 2f6ec7aabdeaf6575f93dbe71d08df98aa13cda2 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 1 Jun 2012 01:45:19 -0400 Subject: remove dumb explicit checks replace "== None" with "is None", replace "== False" with "not" --- Mozo/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Mozo/util.py') 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) -- cgit v1.2.1