]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/python-common/ceph/deployment/hostspec.py
import ceph quincy 17.2.6
[ceph.git] / ceph / src / python-common / ceph / deployment / hostspec.py
index cb7e4de34842484f3ce444c22638fe92d2c6cfcd..0c448bf1313bc6421ff82e5f7b2d712f9bd9ca0e 100644 (file)
@@ -129,7 +129,9 @@ class HostSpec(object):
 
     def __eq__(self, other: Any) -> bool:
         # Let's omit `status` for the moment, as it is still the very same host.
+        if not isinstance(other, HostSpec):
+            return NotImplemented
         return self.hostname == other.hostname and \
-               self.addr == other.addr and \
-               sorted(self.labels) == sorted(other.labels) and \
-               self.location == other.location
+            self.addr == other.addr and \
+            sorted(self.labels) == sorted(other.labels) and \
+            self.location == other.location