From ca3d794c8048f2ebdc917401c1827c79a7611d72 Mon Sep 17 00:00:00 2001 From: David Duque Date: Fri, 17 Apr 2020 19:54:34 +0100 Subject: [PATCH] Sanity improvements --- management/editconf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/management/editconf.py b/management/editconf.py index bd279789..a0d32b17 100644 --- a/management/editconf.py +++ b/management/editconf.py @@ -27,7 +27,7 @@ def edit_conf(filename, settings, folded_lines, testing): found = set() buf = "" - input_lines = list(open(filename)) + input_lines = list(open(filename, "r+")) while len(input_lines) > 0: line = input_lines.pop(0) @@ -138,5 +138,6 @@ if __name__ == "__main__": except: import subprocess print("Invalid command line: ", subprocess.list2cmdline(sys.argv)) + sys.exit(1) edit_conf(filename, settings, folded_lines, testing)