1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-25 07:47:05 +00:00

Sanity improvements

This commit is contained in:
David Duque 2020-04-17 19:54:34 +01:00
parent 51a65a3a22
commit ca3d794c80
No known key found for this signature in database
GPG Key ID: 2F327738A3C0AE3A

View File

@ -27,7 +27,7 @@
def edit_conf(filename, settings, folded_lines, testing): def edit_conf(filename, settings, folded_lines, testing):
found = set() found = set()
buf = "" buf = ""
input_lines = list(open(filename)) input_lines = list(open(filename, "r+"))
while len(input_lines) > 0: while len(input_lines) > 0:
line = input_lines.pop(0) line = input_lines.pop(0)
@ -138,5 +138,6 @@ if __name__ == "__main__":
except: except:
import subprocess import subprocess
print("Invalid command line: ", subprocess.list2cmdline(sys.argv)) print("Invalid command line: ", subprocess.list2cmdline(sys.argv))
sys.exit(1)
edit_conf(filename, settings, folded_lines, testing) edit_conf(filename, settings, folded_lines, testing)