Merge remote-tracking branch 'origin/pr/85'
* origin/pr/85: isinstance instead of type reverted to comparing .index forgot braces forgot braces get_label now accepts integer and has correct return-type
This commit is contained in:
commit
4a727f1dfa
@ -221,11 +221,10 @@ class QubesBase(qubesadmin.base.PropertyHolder):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# then search for index
|
# then search for index
|
||||||
if label.isdigit():
|
if isinstance(label, int) or label.isdigit():
|
||||||
for i in self.labels:
|
for i in self.labels.values():
|
||||||
if i.index == int(label):
|
if i.index == int(label):
|
||||||
return i
|
return i
|
||||||
|
|
||||||
raise KeyError(label)
|
raise KeyError(label)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user