From: Johannes Berg Date: Tue, 28 Jan 2020 23:20:09 +0000 (+0100) Subject: index: fix Entry comparison methods X-Git-Tag: 0.30.1~22 X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=commitdiff_plain;h=9c78eb4acad15ce908a22003b0c57e148bb59062 index: fix Entry comparison methods 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 Reviewed-by: Rob Browning (cherry picked from commit c7013fde92fc73e0064462954918b09541e9a84f) Tested-by: Rob Browning --- diff --git a/lib/bup/index.py b/lib/bup/index.py index 4dffd3a..d0b413e 100644 --- a/lib/bup/index.py +++ b/lib/bup/index.py @@ -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):