get_label now accepts integer and has correct return-type

Esse commit está contido em:
GammaSQ 2018-12-03 15:29:06 +01:00
commit 2e637b5631
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados
ID da chave GPG: D552FD2F98647C64

Ver arquivo

@ -216,10 +216,8 @@ class QubesBase(qubesadmin.base.PropertyHolder):
pass
# then search for index
if label.isdigit():
for i in self.labels:
if i.index == int(label):
return i
if type(label) == int or label.isdigit():
return self.labels.values[int(label)]
raise KeyError(label)