[pitivi] medialibrary: Pythonic check



commit 182ac3d245b2bce27c400eadbd7dce641d2196d6
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Sat Dec 7 18:30:21 2013 +0100

    medialibrary: Pythonic check

 pitivi/medialibrary.py |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 48e447f..d4caccb 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -366,12 +366,11 @@ class MediaLibraryWidget(Gtk.VBox, Loggable):
         Used for the search box.
         """
         text = data.get_text().lower()
-        if text == "":
+        if not text:
             return True  # Avoid silly warnings
-        else:
-            # We must convert to markup form to be able to search for &, ', etc.
-            text = GLib.markup_escape_text(text)
-            return text in model.get_value(iter, COL_INFOTEXT).lower()
+        # We must convert to markup form to be able to search for &, ', etc.
+        text = GLib.markup_escape_text(text)
+        return text in model.get_value(iter, COL_INFOTEXT).lower()
 
     def _getIcon(self, iconname, alternate=None, size=48):
         icontheme = Gtk.IconTheme.get_default()


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