mirror of https://github.com/fail2ban/fail2ban
test-cases: be sure the test-files always written with new-line at end
parent
4108e04ab4
commit
89c611064d
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue