diff --git a/bin/fail2ban-client b/bin/fail2ban-client index 866a5287..b91c339c 100755 --- a/bin/fail2ban-client +++ b/bin/fail2ban-client @@ -430,6 +430,9 @@ class ServerExecutionException(Exception): pass if __name__ == "__main__": # pragma: no cover - can't test main + from time import strptime + # strptime thread safety hack-around - http://bugs.python.org/issue7980 + strptime("2012", "%Y") client = Fail2banClient() # Exit with correct return value if client.start(sys.argv): diff --git a/bin/fail2ban-regex b/bin/fail2ban-regex index 5644dd37..96aca926 100755 --- a/bin/fail2ban-regex +++ b/bin/fail2ban-regex @@ -474,6 +474,9 @@ class Fail2banRegex(object): if __name__ == "__main__": + from time import strptime + # strptime thread safety hack-around - http://bugs.python.org/issue7980 + strptime("2012", "%Y") parser = get_opt_parser() (opts, args) = parser.parse_args() diff --git a/bin/fail2ban-server b/bin/fail2ban-server index ec0c0dbe..dc8d81b4 100755 --- a/bin/fail2ban-server +++ b/bin/fail2ban-server @@ -131,6 +131,9 @@ class Fail2banServer: return False if __name__ == "__main__": + from time import strptime + # strptime thread safety hack-around - http://bugs.python.org/issue7980 + strptime("2012", "%Y") server = Fail2banServer() if server.start(sys.argv): sys.exit(0)