overrides: Checking an empty caps should return False
authorThibault Saunier <tsaunier@gnome.org>
Sat, 15 Mar 2014 14:45:43 +0000 (15:45 +0100)
committerThibault Saunier <tsaunier@gnome.org>
Sat, 15 Mar 2014 15:27:44 +0000 (16:27 +0100)
gi/overrides/Gst.py

index ab192d4..cace5c8 100644 (file)
@@ -63,6 +63,9 @@ __all__.append('Bin')
 
 class Caps(Gst.Caps):
 
+    def __nonzero__(self):
+        return not self.is_empty()
+
     def __new__(cls, *kwargs):
         if not kwargs:
             return Caps.new_empty()