Avoid resetting clocksync service of just enabled clockvm
When setting global clockvm property, 'clocksync' service is automatically added to the new value and then removed from the old one. But if the new value is the same as the old one, the service gets removed from the just set new value. Check for this case explicitly. Fixes QubesOS/qubes-issues#4939
This commit is contained in:
parent
13f35da24a
commit
5d77cf2298
@ -1473,6 +1473,8 @@ class Qubes(qubes.PropertyHolder):
|
||||
@qubes.events.handler('property-set:clockvm')
|
||||
def on_property_set_clockvm(self, event, name, newvalue, oldvalue=None):
|
||||
# pylint: disable=unused-argument,no-self-use
|
||||
if oldvalue == newvalue:
|
||||
return
|
||||
if oldvalue and oldvalue.features.get('service.clocksync', False):
|
||||
del oldvalue.features['service.clocksync']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user