fail2ban/fail2ban — pull request #128 by kwirk (2013-02-24 18:56:31+00:00)
Title: Python3 support

I've made some changes that enable fail2ban to work with python3 once _2to3_ has been used. Fail2ban still functions with python2.5+ (if you haven't run _2to3_ of course :wink:)

One potential issue, is that all log files are opened as 'utf-8' encoding, with encoding errors ignored. Not sure how much of an issue this is, as far is I'm aware, all logs are utf-8 or plain ascii.
Did consider logging a warning if failed to decode a log line, but was worried would spam the fail2ban log files if there is a reoccurring issue.
Also looked at just using bytes, but then regexs complain, such that you need both a compiled _bytes_ and _str/unicode_ for regexs.

I've run testscases on python3.[0-3] with success. Also ran actively with python3.3 and all seems to function with no issues.

To use, execute `./fail2ban-2to3`. You can then use `./fail2ban-testcases-all-python3` or `./fail2ban-testcases` to run tests.

Any testers would be appreciated. :smile:

Thanks