X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;fp=autorandr.py;h=119500bd1cbc73b18c167635ddaeb3523fd9b2dc;hb=ed4eab647ab041a22ba25bec0a115e5f66a5a543;hp=bf552bc9113c3f15e69e2328f1f4b46a4c4a4dbc;hpb=c8c1f290dbb91d34a2482d94adbbdc2a1a09e9c3;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index bf552bc..119500b 100755 --- a/autorandr.py +++ b/autorandr.py @@ -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()