quebs: make Label() and storage.Pool() objects hashable
This commit is contained in:
parent
59426b2dbc
commit
f324d30d4e
@ -110,6 +110,9 @@ class Label(object):
|
||||
return self.name == other.name
|
||||
return NotImplemented
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.name)
|
||||
|
||||
@builtins.property
|
||||
def icon_path(self):
|
||||
'''Icon path
|
||||
|
@ -519,6 +519,9 @@ class Pool(object):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.name)
|
||||
|
||||
def __xml__(self):
|
||||
config = _sanitize_config(self.config)
|
||||
return lxml.etree.Element('pool', **config)
|
||||
|
Loading…
Reference in New Issue
Block a user