Skip to content

Commit

Permalink
fix S113 Requests call without timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
pogross committed Jul 4, 2023
1 parent 3ea6513 commit c654f11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/karmabot/commands/tip.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

def get_random_tip(**kwargs):
"""Print a random Python tip, quote or nugget from CodeChalleng.es"""
resp = requests.get(TIPS_ENDPOINT)
resp = requests.get(TIPS_ENDPOINT, timeout=10)
tips = resp.json()
tip = random.choice(tips)
msg = f"> {tip['tip']}\n"
Expand Down

0 comments on commit c654f11

Please sign in to comment.