Skip to content

Commit

Permalink
Fix issues identified by linter
Browse files Browse the repository at this point in the history
  • Loading branch information
eecavanna authored Nov 22, 2024
1 parent ef03dc3 commit 67ce83b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nmdc_server/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def require_setting(name: str):
# Post a message to Slack if a Slack webhook URL is defined.
# Reference: https://api.slack.com/messaging/webhooks#posting_with_webhooks
if settings.slack_webhook_url_for_ingester not in [None, ""]:
click.echo(f"Posting message to Slack.")
click.echo("Posting message to Slack.")
response = requests.post(
settings.slack_webhook_url_for_ingester,
json={"text": "Ingest is done."},
Expand All @@ -156,8 +156,8 @@ def require_setting(name: str):
# Note: We currently consider the posting of a Slack message to be a "nice
# to have" as opposed to a "must have." So, if it happens to fail,
# we just echo an error message instead of `raise`-ing an exception.
if r.status_code != 200:
click.echo(f"Failed to post message to Slack.", err=True)
if response.status_code != 200:
click.echo("Failed to post message to Slack.", err=True)


@cli.command()
Expand Down

0 comments on commit 67ce83b

Please sign in to comment.