From f6468e753bc2c1ef37775bfa88fd224174d9ac9e Mon Sep 17 00:00:00 2001 From: sebres Date: Sun, 24 Feb 2019 17:14:53 +0100 Subject: [PATCH] resolves py3.x compat issues in tests --- fail2ban/server/server.py | 2 +- fail2ban/tests/fail2banclienttestcase.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fail2ban/server/server.py b/fail2ban/server/server.py index b7ee264a..33edf315 100644 --- a/fail2ban/server/server.py +++ b/fail2ban/server/server.py @@ -717,7 +717,7 @@ class Server: raise KeyError("unknown option %r" % o) def getThreadOptions(self): - return {'stacksize': threading.stack_size() / 1024} + return {'stacksize': threading.stack_size() // 1024} def setDatabase(self, filename): # if not changed - nothing to do diff --git a/fail2ban/tests/fail2banclienttestcase.py b/fail2ban/tests/fail2banclienttestcase.py index 67481211..1b072db7 100644 --- a/fail2ban/tests/fail2banclienttestcase.py +++ b/fail2ban/tests/fail2banclienttestcase.py @@ -479,7 +479,7 @@ class Fail2banClientTest(Fail2banClientServerBase): # use once the stock configuration (to test starting also) startparams = _start_params(tmp, True) # test additional options: - _write_file(pjoin(tmp, "config", "fail2ban.conf"), "a", + _write_file(pjoin(tmp, "config", "fail2ban.local"), "w", "[Thread]", "stacksize = 32" "",