isinstance instead of type

这个提交包含在:
GammaSQ 2018-12-08 12:00:15 +01:00
父节点 c0dbf459aa
当前提交 2c836c5adc
找不到此签名对应的密钥
GPG 密钥 ID: D552FD2F98647C64

查看文件

@ -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