mirror of
https://github.com/phillipberndt/autorandr
synced 2025-03-02 10:41:30 +00:00
Python version: Option handling for unrecognized options
This commit is contained in:
parent
31bb177d67
commit
945889d272
@ -416,7 +416,11 @@ def exec_scripts(profile_path, script_name):
|
|||||||
subprocess.call(script)
|
subprocess.call(script)
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
|
try:
|
||||||
options = dict(getopt.getopt(argv[1:], "s:l:d:cfh", [ "dry-run", "change", "default=", "save=", "load=", "force", "fingerprint", "config", "help" ])[0])
|
options = dict(getopt.getopt(argv[1:], "s:l:d:cfh", [ "dry-run", "change", "default=", "save=", "load=", "force", "fingerprint", "config", "help" ])[0])
|
||||||
|
except getopt.GetoptError as e:
|
||||||
|
print(str(e))
|
||||||
|
options = { "--help": True }
|
||||||
|
|
||||||
profile_path = os.path.expanduser("~/.autorandr")
|
profile_path = os.path.expanduser("~/.autorandr")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user