diff --git a/src/mio/util.py b/src/mio/util.py
index 4418193f51f2fb904142eea2773980a0580f4f78..72202189ebb247c4f0e51398e55eef3cba0489cb 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()