added --debug flag
This commit is contained in:
parent
153665883f
commit
1419cf5dc2
@ -247,6 +247,8 @@ def main(config, debug):
|
|||||||
The main entry point of the application.
|
The main entry point of the application.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
config (str): path to config file
|
||||||
|
debug (bool): is debug output enabled
|
||||||
"""
|
"""
|
||||||
if not debug:
|
if not debug:
|
||||||
ic.disable()
|
ic.disable()
|
||||||
|
15
test.py
Executable file
15
test.py
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!./venv/bin/python3
|
||||||
|
|
||||||
|
import click
|
||||||
|
import os
|
||||||
|
|
||||||
|
#@click.option('--config', '-c', default=config_file, help='Path to the configuration file.')
|
||||||
|
|
||||||
|
@click.command()
|
||||||
|
@click.option('--debug/-d', envvar='DEVELOPMENTS', default='false', help='enable dubug output')
|
||||||
|
def main(debug):
|
||||||
|
print(debug)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
Loading…
Reference in New Issue
Block a user