core: fix handling numeric label value set
Not sure if it should be supported this way, but surely it shouldn't throw AttributeError.
This commit is contained in:
parent
79a6da1163
commit
e3c94f3949
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user