diff --git a/fail2ban/tests/fail2banclienttestcase.py b/fail2ban/tests/fail2banclienttestcase.py index c9c5ea41..fb820a5a 100644 --- a/fail2ban/tests/fail2banclienttestcase.py +++ b/fail2ban/tests/fail2banclienttestcase.py @@ -126,7 +126,7 @@ def _out_file(fn, handle=logSys.debug): def _write_file(fn, mode, *lines): f = open(fn, mode) - f.write('\n'.join(lines)) + f.write('\n'.join(lines)+('\n' if lines else '')) f.close() def _read_file(fn):