def set_action(self, value):
        """Setter for action attribute"""
        if value not in ("remove", "add"):
            log = "Sources field 'action' should be 'remove' or 'add'."
            raise MalFormattedSource(log)
        self._action = value
def set_action ( self , value ) : if value not in ( "remove" , "add" ) : log = "Sources field 'action' should be 'remove' or 'add'." raise MalFormattedSource ( log ) self . _action = value
Setter for action attribute