Skip to content

Commit

Permalink
Merge pull request ceph#26399 from jan--f/c-v-fix-hashable-py3
Browse files Browse the repository at this point in the history
ceph-volume: make Device hashable to allow set of Device list in py3

Reviewed-by: Andrew Schoen <[email protected]>
  • Loading branch information
andrewschoen authored Feb 18, 2019
2 parents eb1caff + f872ab7 commit a941e28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ceph-volume/ceph_volume/util/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ def __lt__(self, other):
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()
Expand Down

0 comments on commit a941e28

Please sign in to comment.