Fix script help ()

Allow `--help` to filter down to the script
pull/2922/head
Johann Kellerman 2016-08-18 03:57:52 +02:00 committed by Paulus Schoutsen
parent 8a3c511a04
commit 244f60d6cd
1 changed files with 1 additions and 1 deletions
homeassistant/scripts

View File

@ -49,7 +49,7 @@ def run(args: List) -> int:
def extract_config_dir(args=None) -> str:
"""Extract the config dir from the arguments or get the default."""
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument('-c', '--config', default=None)
args = parser.parse_known_args(args)[0]
return (os.path.join(os.getcwd(), args.config) if args.config