From 8b125dd19ff077bc37977c0a3be0b0c948bee5a7 Mon Sep 17 00:00:00 2001
From: Anders Blomdell <anders.blomdell@control.lth.se>
Date: Wed, 20 Apr 2022 16:59:46 +0200
Subject: [PATCH] Fix python2 __ne__ error

---
 src/mio/util.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/mio/util.py b/src/mio/util.py
index 1a09fe7..bd47c0e 100755
--- a/src/mio/util.py
+++ b/src/mio/util.py
@@ -90,6 +90,13 @@ def uid(owner):
                 log(NORMAL, "Deferring uid lookup for '%s'" % owner)
                 return False
 
+        def __ne__(self, other):
+            try:
+                return int(self) != other
+            except KeyError:
+                log(NORMAL, "Deferring uid lookup for '%s'" % owner)
+                return False
+
     return deferred_uid()
 
 def gid(group):
@@ -111,7 +118,14 @@ def gid(group):
             except KeyError:
                 log(NORMAL, "Deferring gid lookup for '%s'" % group)
                 return False
-            
+
+        def __ne__(self, other):
+            try:
+                return int(self) != other
+            except KeyError:
+                log(NORMAL, "Deferring gid lookup for '%s'" % group)
+                return False
+
     return deferred_gid()
 
 def owner(decl):
-- 
GitLab