From 1d6e7063f61e9f257475e39947da4b74178dd68f Mon Sep 17 00:00:00 2001 From: Anders Blomdell <anders.blomdell@control.lth.se> Date: Fri, 30 Aug 2019 12:34:19 +0200 Subject: [PATCH] Get rid of old __cmp__ function --- src/mio/util.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mio/util.py b/src/mio/util.py index 4418193..7220218 100755 --- a/src/mio/util.py +++ b/src/mio/util.py @@ -82,12 +82,12 @@ def uid(owner): except KeyError: raise KeyError("user '%s' not found" % owner) - def __cmp__(self, other): + def __eq__(self, other): try: - return cmp(int(self), other) + return int(self) == other except KeyError: log(NORMAL, "Deferring uid lookup for '%s'" % owner) - return cmp(None, other) + return False return deferred_uid() @@ -104,12 +104,12 @@ def gid(group): except KeyError: raise KeyError("group '%s' not found" % group) - def __cmp__(self, other): + def __eq__(self, other): try: - return cmp(int(self), other) + return int(self) == other except KeyError: log(NORMAL, "Deferring gid lookup for '%s'" % group) - return cmp(None, other) + return False return deferred_gid() -- GitLab