- Improved "action" option handling

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@273 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.x
Cyril Jaquier 2006-08-20 20:38:08 +00:00
parent 01c9c4dbfa
commit ec8f620f80
1 changed files with 10 additions and 6 deletions

View File

@ -67,12 +67,16 @@ class JailReader(ConfigReader):
self.filter.getOptions(self.opts)
# Read action
for act in self.opts["action"].split():
for act in self.opts["action"].split('\n'):
try:
splitAct = JailReader.splitAction(act)
action = ActionReader(splitAct, self.name)
action.read()
action.getOptions(self.opts)
self.actions.append(action)
except AttributeError, e:
logSys.error("Error in action definition " + act)
logSys.debug(e)
def convert(self):
stream = [["add", self.name]]