qubes: fix resetting already default property
`getattr(instance, self.__name__)` always succeed if attribute has default value. This results in deleting attribute even when it isn't set.
This commit is contained in:
parent
a2d9b15413
commit
bb78eb1ce6
@ -274,7 +274,7 @@ class property(object): # pylint: disable=redefined-builtin,invalid-name
|
||||
self._enforce_write_once(instance)
|
||||
|
||||
try:
|
||||
oldvalue = getattr(instance, self.__name__)
|
||||
oldvalue = getattr(instance, self._attr_name)
|
||||
has_oldvalue = True
|
||||
except AttributeError:
|
||||
has_oldvalue = False
|
||||
|
Loading…
Reference in New Issue
Block a user