]> arthur.barton.de Git - bup.git/commitdiff
index: fix Entry comparison methods
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 28 Jan 2020 23:20:09 +0000 (00:20 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sat, 25 Apr 2020 19:22:16 +0000 (14:22 -0500)
Some of these methods are evidently not used today,
but they should have proper arguments anyway.

Fixes: 3ff7455dd474 ("Don't use cmp()")
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
(cherry picked from commit c7013fde92fc73e0064462954918b09541e9a84f)
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/index.py

index 4dffd3a3a1180bc5647a2cbfdf28f845b82956ca..d0b413efd57582b807b39da6e277f47732215034 100644 (file)
@@ -298,7 +298,7 @@ class Entry:
     def __eq__(self, other):
         return self._cmp(other) == 0
 
-    def __ne__():
+    def __ne__(self, other):
         return self._cmp(other) != 0
 
     def __lt__(self, other):
@@ -307,10 +307,10 @@ class Entry:
     def __gt__(self, other):
         return self._cmp(other) > 0
 
-    def __le__():
+    def __le__(self, other):
         return self._cmp(other) <= 0
 
-    def __ge__():
+    def __ge__(self, other):
         return self._cmp(other) >= 0
 
     def write(self, f):