mirror of
https://github.com/phillipberndt/autorandr
synced 2025-02-20 05:47:00 +00:00
getopt: save args
This commit is contained in:
parent
c8c1f290db
commit
ed4eab647a
@ -955,13 +955,15 @@ def dispatch_call_to_sessions(argv):
|
||||
|
||||
def main(argv):
|
||||
try:
|
||||
options = dict(getopt.getopt(argv[1:], "s:r:l:d:cfh", ["batch", "dry-run", "change", "default=", "save=", "remove=", "load=", "force", "fingerprint", "config", "debug", "skip-options=", "help"])[0])
|
||||
opts, args = getopt.getopt(argv[1:], "s:r:l:d:cfh", ["batch", "dry-run", "change", "default=", "save=", "remove=", "load=", "force", "fingerprint", "config", "debug", "skip-options=", "help"])
|
||||
except getopt.GetoptError as e:
|
||||
print("Failed to parse options: {0}.\n"
|
||||
"Use --help to get usage information.".format(str(e)),
|
||||
file=sys.stderr)
|
||||
sys.exit(posix.EX_USAGE)
|
||||
|
||||
options = dict(opts)
|
||||
|
||||
if "-h" in options or "--help" in options:
|
||||
exit_help()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user