On Fri, Jun 28, 2013 at 18:49:38 +0200, Jakub Filak wrote:
diff --git a/src/gnome_abrt/problems.py b/src/gnome_abrt/problems.py
index 314dfcf..96a34ee 100644
--- a/src/gnome_abrt/problems.py
+++ b/src/gnome_abrt/problems.py
@@ -297,13 +290,34 @@ class MultipleSources(ProblemSource):
self._disable_notify = False
+ def __eq__(self, other):
+ if other is None:
+ return False
+
+ return (super(MultipleSources, self) == other
+ or other in self.sources)
It appears that you can't use == directly with the result of super(),
you probably have to call __eq__ explicitly:
class A(object):
def __eq__(self, other):
return True
class B(A):
pass
b = B()
super(B, b) == 42
-> False
super(B, b).__eq__(42)
-> True
Also, "other in self.sources" seems a bit weird when considering
equality, but perhaps it is needed for some reason, I didn't check.
Apart from what I mentioned on IRC and this, I found no other issues.
Martin