Blame SOURCES/0002-Fix-comparisons-to-None.patch

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