Skip to content

Commit 90cb68b

Browse files
committed
fix: get
1 parent b397059 commit 90cb68b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

{{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
def log_decorator(f):
4747
@click.pass_context
4848
def new_func(ctx, *args, **kwargs):
49-
if ctx.params["log_level"]:
49+
if ctx.params.get("log_level", False):
5050
ctx.obj["log_level"] = ctx.params["log_level"]
5151
log.setLevel(log_levels[ctx.obj["log_level"]])
5252
r = ctx.invoke(f, *args, **kwargs)
@@ -80,7 +80,7 @@ def new_func(ctx, *args, **kwargs):
8080
def profile_decorator(f):
8181
@click.pass_context
8282
def new_func(ctx, *args, **kwargs):
83-
if ctx.params["profiling"]:
83+
if ctx.params.get("profiling", False):
8484
ctx.obj["profiling"] = ctx.params["profiling"]
8585
ctx.obj["profiling_file"] = ctx.params["profiling_file"]
8686
ctx.obj["profiling_sort_key"] = ctx.params["profiling_sort_key"]

0 commit comments

Comments
 (0)