isinstance instead of type
This commit is contained in:
parent
c0dbf459aa
commit
2c836c5adc
@ -216,11 +216,10 @@ class QubesBase(qubesadmin.base.PropertyHolder):
|
||||
pass
|
||||
|
||||
# then search for index
|
||||
if type(label) == int or label.isdigit():
|
||||
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