Skip to content

Commit

Permalink
fix CLI publish
Browse files Browse the repository at this point in the history
  • Loading branch information
KaraMelih committed Aug 3, 2022
1 parent a12a23a commit 6c7d5bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions snews_pt/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def main(ctx, env):


@main.command()
@click.option('--firedrill/--no-firedrill', default=True, show_default='True', help='Whether to use firedrill brokers or default ones')
@click.option('--firedrill/--no-firedrill', default=True, show_default='True',
help='Whether to use firedrill brokers or default ones')
@click.argument('file', nargs=-1)
@click.pass_context
def publish(ctx, file, firedrill):
Expand All @@ -50,7 +51,7 @@ def publish(ctx, file, firedrill):
click.clear()
for f in file:
if f.endswith('.json'):
SNEWSTiersPublisher.from_json(jsonfile=f, env_file=ctx.obj['env']).send_to_snews(firedrill)
SNEWSTiersPublisher.from_json(jsonfile=f, env_file=ctx.obj['env'], firedrill_mode=firedrill).send_to_snews()

else:
# maybe just print instead of raising
Expand Down

0 comments on commit 6c7d5bd

Please sign in to comment.