From e3c94f3949f6ddf66d79400c573a6eab4c615915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 10 Feb 2016 19:26:44 +0100 Subject: [PATCH] core: fix handling numeric label value set Not sure if it should be supported this way, but surely it shouldn't throw AttributeError. --- qubes/vm/qubesvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 8540234d..3f97deeb 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -118,7 +118,7 @@ def _setter_label(self, prop, value): # pylint: disable=unused-argument if isinstance(value, qubes.Label): return value - if value.startswith('label-'): + if isinstance(value, basestring) and value.startswith('label-'): return self.app.labels[int(value.split('-', 1)[1])] return self.app.get_label(value)