get_label now accepts integer and has correct return-type
This commit is contained in:
parent
0b47df2b54
commit
2e637b5631
@ -216,10 +216,8 @@ class QubesBase(qubesadmin.base.PropertyHolder):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# then search for index
|
# then search for index
|
||||||
if label.isdigit():
|
if type(label) == int or label.isdigit():
|
||||||
for i in self.labels:
|
return self.labels.values[int(label)]
|
||||||
if i.index == int(label):
|
|
||||||
return i
|
|
||||||
|
|
||||||
raise KeyError(label)
|
raise KeyError(label)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user