71285d
From 32d8b8ef61a3786ff409bdba7f74ab53987f04c1 Mon Sep 17 00:00:00 2001
71285d
From: Andy Grover <agrover@redhat.com>
71285d
Date: Wed, 28 Oct 2015 09:28:29 -0700
71285d
Subject: [PATCH] Fix comparisons to None
71285d
71285d
see https://bugzilla.redhat.com/show_bug.cgi?id=1276044
71285d
71285d
Signed-off-by: Andy Grover <agrover@redhat.com>
71285d
---
71285d
 rtslib/node.py | 4 ++--
71285d
 1 file changed, 2 insertions(+), 2 deletions(-)
71285d
71285d
diff --git a/rtslib/node.py b/rtslib/node.py
71285d
index c319a5b..e61249d 100644
71285d
--- a/rtslib/node.py
71285d
+++ b/rtslib/node.py
71285d
@@ -34,10 +34,10 @@ class CFSNode(object):
71285d
         self._path = self.configfs_dir
71285d
 
71285d
     def __eq__(self, other):
71285d
-        return self._path == other._path
71285d
+        return isinstance(other, self.__class__) and self._path == other._path
71285d
 
71285d
     def __ne__(self, other):
71285d
-        return self._path != other._path
71285d
+        return not self.__eq__(other)
71285d
 
71285d
     def _get_path(self):
71285d
         return self._path