qubespolicy: make commas exchangeable for spaces

Commas in policy action are optional, if used with spaces.
This commit is contained in:
Wojtek Porczyk 2017-07-04 12:49:26 +02:00
parent 36d56010af
commit 55c9370454

View File

@ -129,7 +129,7 @@ class PolicyRule(object):
except ValueError:
raise PolicySyntaxError(filename, lineno, 'wrong number of fields')
(action, *params) = self.full_action.replace(' ', '').split(',')
(action, *params) = self.full_action.replace(',', ' ').split()
try:
self.action = Action[action]
except KeyError: