Commit 2cab9d55 authored by Joshua Tauberer's avatar Joshua Tauberer

editconf.py: better error message if command line arguments are not valid

parent c38bdbb0
......@@ -54,6 +54,14 @@ while settings[0][0] == "-" and settings[0] != "--":
print("Invalid option.")
sys.exit(1)
# sanity check command line
for setting in settings:
try:
name, value = setting.split("=", 1)
except:
import subprocess
print("Invalid command line: ", subprocess.list2cmdline(sys.argv))
# create the new config file in memory
found = set()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment