mirror of https://github.com/fail2ban/fail2ban
Fix strptime thread safety issue
strptime thread safety hack-around - http://bugs.python.org/issue7980pull/906/head
parent
bcfcefa203
commit
d0bcacd97b
|
@ -430,6 +430,9 @@ class ServerExecutionException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if __name__ == "__main__": # pragma: no cover - can't test main
|
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()
|
client = Fail2banClient()
|
||||||
# Exit with correct return value
|
# Exit with correct return value
|
||||||
if client.start(sys.argv):
|
if client.start(sys.argv):
|
||||||
|
|
|
@ -474,6 +474,9 @@ class Fail2banRegex(object):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
from time import strptime
|
||||||
|
# strptime thread safety hack-around - http://bugs.python.org/issue7980
|
||||||
|
strptime("2012", "%Y")
|
||||||
|
|
||||||
parser = get_opt_parser()
|
parser = get_opt_parser()
|
||||||
(opts, args) = parser.parse_args()
|
(opts, args) = parser.parse_args()
|
||||||
|
|
|
@ -131,6 +131,9 @@ class Fail2banServer:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
from time import strptime
|
||||||
|
# strptime thread safety hack-around - http://bugs.python.org/issue7980
|
||||||
|
strptime("2012", "%Y")
|
||||||
server = Fail2banServer()
|
server = Fail2banServer()
|
||||||
if server.start(sys.argv):
|
if server.start(sys.argv):
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
Loading…
Reference in New Issue