aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libbe/bug.py2
-rw-r--r--libbe/diff.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/libbe/bug.py b/libbe/bug.py
index 2b79605..46b25f2 100644
--- a/libbe/bug.py
+++ b/libbe/bug.py
@@ -277,6 +277,8 @@ class Bug (settings_object.SavedSettingsObject):
return self.string(shortlist=True)
def __eq__(self, other, cmp_list=DEFAULT_IDX_FULL_IDX_LIST):
+ if not isinstance(other, type(self)):
+ return False
for comparison in cmp_list:
if comparison(self, other) != 0:
return False
diff --git a/libbe/diff.py b/libbe/diff.py
index f7ddfbe..40d53a6 100644
--- a/libbe/diff.py
+++ b/libbe/diff.py
@@ -464,7 +464,7 @@ class Diff (object):
removed.append(old_bug)
added.sort()
removed.sort()
- modified.sort(self._bug_modified_cmp)
+ modified.sort(key=functools.cmp_to_key(self._bug_modified_cmp))
return (added, modified, removed)
def _bug_modified_cmp(self, left, right):