parent
1304be0718
commit
5fd40af285
1 changed files with 1 additions and 17 deletions
|
@ -163,9 +163,7 @@ class Application:
|
|||
"""
|
||||
from . import __version__
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='A general-purpose platform for automation'
|
||||
)
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument(
|
||||
'--config',
|
||||
|
@ -176,15 +174,6 @@ class Application:
|
|||
help='Custom location for the configuration file',
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--help',
|
||||
'-h',
|
||||
dest='help',
|
||||
required=False,
|
||||
action='store_true',
|
||||
help="Print this help and exit",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--version',
|
||||
dest='version',
|
||||
|
@ -271,15 +260,10 @@ class Application:
|
|||
)
|
||||
|
||||
opts, _ = parser.parse_known_args(args)
|
||||
|
||||
if opts.version:
|
||||
print(__version__)
|
||||
sys.exit(0)
|
||||
|
||||
if opts.help:
|
||||
parser.print_help()
|
||||
sys.exit(0)
|
||||
|
||||
return cls(
|
||||
config_file=opts.config,
|
||||
pidfile=opts.pidfile,
|
||||
|
|
Loading…
Reference in a new issue