vm: Features fixes
clear: dict should not be mutated during interation.
This commit is contained in:
parent
ba86d6da79
commit
680dbf432c
@ -102,11 +102,13 @@ class Features(dict):
|
||||
value = '1' if value else ''
|
||||
else:
|
||||
value = str(value)
|
||||
# TODO: perhaps this shouldn't be fired on unchanged value? or at
|
||||
# least oldvalue should be provided?
|
||||
self.vm.fire_event('domain-feature-set', key=key, value=value)
|
||||
super(Features, self).__setitem__(key, value)
|
||||
|
||||
def clear(self):
|
||||
for key in self:
|
||||
for key in tuple(self):
|
||||
del self[key]
|
||||
|
||||
def pop(self, _key, _default=None):
|
||||
|
@ -301,7 +301,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
||||
A feature was removed.
|
||||
|
||||
:param subject: Event emitter (the qube object)
|
||||
:param event: Event name (``'domain-feature-set'``)
|
||||
:param event: Event name (``'domain-feature-delete'``)
|
||||
:param key: feature name
|
||||
|
||||
.. event:: domain-tag-add (subject, event, tag)
|
||||
|
Loading…
Reference in New Issue
Block a user