From 8cc4bda46a3d51f0e649c039514726a9f23e2292 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sat, 15 Mar 2014 15:45:43 +0100 Subject: [PATCH] overrides: Checking an empty caps should return False --- gi/overrides/Gst.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gi/overrides/Gst.py b/gi/overrides/Gst.py index ab192d4a28..cace5c8df9 100644 --- a/gi/overrides/Gst.py +++ b/gi/overrides/Gst.py @@ -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()