From 2c836c5adc0d7af196f7a147e1acdc161be91322 Mon Sep 17 00:00:00 2001 From: GammaSQ Date: Sat, 8 Dec 2018 12:00:15 +0100 Subject: [PATCH] isinstance instead of type --- qubesadmin/app.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qubesadmin/app.py b/qubesadmin/app.py index 8c6b749..a88d0e4 100644 --- a/qubesadmin/app.py +++ b/qubesadmin/app.py @@ -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