Skip to content

Commit

Permalink
[CveXplore-278] black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
P-T-I committed Apr 19, 2024
1 parent c2126ec commit 2179c30
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions CveXplore/cli_cmds/tasks_cmds/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ def scheduled_cmd(ctx, list, delete, toggle, purge, results):
@click.pass_context
def scheduled_cmd(ctx, number, slug, interval, crontab):
if interval:
click.echo(ctx.obj["data_source"].task_handler.create_task_by_number(
task_number=number, task_slug=slug, task_interval=interval
))
click.echo(
ctx.obj["data_source"].task_handler.create_task_by_number(
task_number=number, task_slug=slug, task_interval=interval
)
)
elif crontab:

the_crontab = {
Expand All @@ -222,9 +224,11 @@ def scheduled_cmd(ctx, number, slug, interval, crontab):
the_crontab[list(the_crontab.keys())[i]] = each
i += 1

click.echo(ctx.obj["data_source"].task_handler.create_task_by_number(
task_number=number, task_slug=slug, task_crontab=the_crontab
))
click.echo(
ctx.obj["data_source"].task_handler.create_task_by_number(
task_number=number, task_slug=slug, task_crontab=the_crontab
)
)
except Exception as err:
click.echo(
f"Could not insert crontab; error: {err}",
Expand Down

0 comments on commit 2179c30

Please sign in to comment.