]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: make Device hashable to allow set of Device list in py3 26399/head
authorJan Fajerski <jfajerski@suse.com>
Wed, 13 Feb 2019 11:35:05 +0000 (12:35 +0100)
committerJan Fajerski <jfajerski@suse.com>
Wed, 13 Feb 2019 11:36:07 +0000 (12:36 +0100)
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
src/ceph-volume/ceph_volume/util/device.py

index cb62a744fbf2a677b3d0534e3c6911cae4344e02..407bc420cdef43823b5cfa1f78107df38acbff30 100644 (file)
@@ -106,6 +106,9 @@ class Device(object):
     def __eq__(self, other):
         return self.path == other.path
 
+    def __hash__(self):
+        return hash(self.path)
+
     def _parse(self):
         if not sys_info.devices:
             sys_info.devices = disk.get_devices()