Forwarding succesfully added e saved in XML

This commit is contained in:
Giulio 2021-06-25 10:50:21 +02:00
parent 11b9071066
commit df8ad3e866

View File

@ -388,14 +388,14 @@ class Rule(qubes.PropertyHolder):
@qubes.events.handler('property-set:forwardtype') @qubes.events.handler('property-set:forwardtype')
def on_set_forwardtype(self, event, name, newvalue, oldvalue=None): def on_set_forwardtype(self, event, name, newvalue, oldvalue=None):
# pylint: disable=unused-argument # pylint: disable=unused-argument
if self.action is not 'forward': if self.action != 'forward':
raise ValueError( raise ValueError(
'forwardtype valid only for forward action') 'forwardtype valid only for forward action')
@qubes.events.handler('property-set:srcports') @qubes.events.handler('property-set:srcports')
def on_set_srcports(self, event, name, newvalue, oldvalue=None): def on_set_srcports(self, event, name, newvalue, oldvalue=None):
# pylint: disable=unused-argument # pylint: disable=unused-argument
if self.action is not 'forward': if self.action != 'forward':
raise ValueError( raise ValueError(
'srcports valid only for forward action') 'srcports valid only for forward action')