diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2024-03-30 22:27:26 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-03-30 22:27:26 +0100 |
commit | 30e92142622ee1058d4985559b019b15076c415b (patch) | |
tree | 2f51133b68e4bc52d1debb39d15d52e1463f85e7 /libbe | |
parent | 6669d427f87ec62a86a680a542d2f87f2d65cc80 (diff) | |
download | bugseverywhere-30e92142622ee1058d4985559b019b15076c415b.tar.gz |
Fix two more Py2->Py3 conversions
Diffstat (limited to 'libbe')
-rw-r--r-- | libbe/bug.py | 2 | ||||
-rw-r--r-- | libbe/diff.py | 2 |
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): |