diff --git a/qubesadmin/app.py b/qubesadmin/app.py index 073b8ad..7fc8a4e 100644 --- a/qubesadmin/app.py +++ b/qubesadmin/app.py @@ -221,11 +221,10 @@ class QubesBase(qubesadmin.base.PropertyHolder): pass # then search for index - if label.isdigit(): - for i in self.labels: + if isinstance(label, int) or label.isdigit(): + for i in self.labels.values(): if i.index == int(label): return i - raise KeyError(label) @staticmethod