Skip to content

Commit

Permalink
Minor cosmetic & similar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dkozinn committed Sep 9, 2024
1 parent 65596b4 commit 3381d43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/nasamodqbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
SUB = get_sub()


def main():
def main() -> None:
"""Main loop"""

reddit = praw.Reddit("nasamodqbot")
Expand Down Expand Up @@ -69,7 +69,7 @@ def main():
)

webhook.execute()
except Exception as e:
except Exception as e: # pylint: disable=broad-except
logging.exception("Error sending to Discord: %s", str(e))

if GOT_Q:
Expand Down
2 changes: 1 addition & 1 deletion src/nasautils/discord_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def discord_alert(webhook, username, message, url, notify=None):
}
logging.debug("Posting message as %s: %s (%s)", username, message, url)
try:
r = requests.post(webhook, json=data)
r = requests.post(webhook, json=data, timeout=30)
r.raise_for_status()

# Always wait at least x-ratelimit-reset-after seconds
Expand Down

0 comments on commit 3381d43

Please sign in to comment.