Add debug flag for run cli

This commit is contained in:
Tim Van Baak 2020-06-08 22:15:56 -07:00
parent c2569cc321
commit ee23a34cf2
1 changed files with 8 additions and 1 deletions

View File

@ -193,9 +193,16 @@ def command_feed(args):
def command_run(args): def command_run(args):
"""Run the default Flask server.""" """Run the default Flask server."""
parser = argparse.ArgumentParser(
prog="inquisitor run",
description=command_run.__doc__,
add_help=False)
parser.add_argument("--debug", action="store_true")
args = parser.parse_args(args)
try: try:
from inquisitor.app import app from inquisitor.app import app
app.run() app.run(debug=args.debug)
return 0 return 0
except Exception as e: except Exception as e:
logger.error(e) logger.error(e)