From 89c611064db13caf485c13e6464fff52bb8f8056 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 14 Jan 2019 19:00:42 +0100 Subject: [PATCH] test-cases: be sure the test-files always written with new-line at end --- fail2ban/tests/fail2banclienttestcase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):