Process --help first, before executing predetect hook

This commit is contained in:
Phillip Berndt 2017-01-20 14:59:57 +01:00
parent 6973ad25ee
commit 5a79c16e23

View File

@ -853,6 +853,9 @@ def main(argv):
file=sys.stderr)
sys.exit(posix.EX_USAGE)
if "-h" in options or "--help" in options:
exit_help()
# Batch mode
if "--batch" in options:
if ("DISPLAY" not in os.environ or not os.environ["DISPLAY"]) and os.getuid() == 0:
@ -947,9 +950,6 @@ def main(argv):
raise AutorandrException("Failed to remove profile '%s'" % (options["--remove"],), e)
sys.exit(0)
if "-h" in options or "--help" in options:
exit_help()
detected_profiles = find_profiles(config, profiles)
load_profile = False