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
|
||||
|
||||
# then search for index
|
||||
if label.isdigit():
|
||||
for i in self.labels:
|
||||
if isinstance(label, int) or label.isdigit():
|
||||
for i in self.labels.values():
|
||||
if i.index == int(label):
|
||||
return i
|
||||
|
||||
raise KeyError(label)
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user