The last upgrade of EPEL package fail2ban misbehaves on CentOS 5,
as it contains a syntax which is still unsupported on Python 2.4.

When trying to start fail2ban, you will get errors like these:
ERROR NOK: ('invalid syntax', ('/usr/share/fail2ban/server/filterpyinotify.py', 214, 21, '\t\texcept Exception as e:\n'))
  ERROR  NOK: ('ssh-iptables',)

A proposed fix is attached.

Best regards,
                                          Bussi Andrea
The last upgrade of EPEL package fail2ban misbehaves on CentOS 5,
as it contains a syntax which is still unsupported on Python 2.4.

When trying to start fail2ban, you will get:
  ERROR  NOK: ('invalid syntax', ('/usr/share/fail2ban/server/filterpyinotify.py', 214, 21, '\t\texcept Exception as e:\n'))
  ERROR  NOK: ('ssh-iptables',)


To directly fix fail2ban on machine, you can use this patch like this:

  cd /
  patch -p1 <fail2ban.patch

And then restart fail2ban, and see if the errors go away.

--- a/usr/share/fail2ban/server/filterpyinotify.py	2014-08-18 09:55:02.000000000 +0200
+++ b/usr/share/fail2ban/server/filterpyinotify.py	2014-08-18 09:55:08.000000000 +0200
@@ -212,6 +212,6 @@
 	def process_default(self, event):
 		try:
 			self.__FileFilter.callback(event, origin='Default ')
-		except Exception as e:
+		except Exception, e:
 			logSys.error("Error in FilterPyinotify callback: %s",
 				e, exc_info=logSys.getEffectiveLevel() <= logging.DEBUG)
_______________________________________________
epel-devel mailing list
epel-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/epel-devel

Reply via email to