Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ExceptNotifier/pycore/discord_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __call__(etype, value, tb):
exceptNotifier["BODY"] += "\n\t%20s = " % key
try:
exceptNotifier["BODY"] += str(val)
except:
except Exception:
exceptNotifier["BODY"] += "<ERROR WHILE PRINTING VALUE>"

print(exceptNotifier["BODY"])
Expand Down Expand Up @@ -121,7 +121,7 @@ def send_discord_msg(_DISCORD_WEBHOOK_URL: str, msg: str) -> dict:
_DISCORD_WEBHOOK_URL, adapter=RequestsWebhookAdapter()
)
resp = webhook.send(msg)
except:
except Exception:
from discord import SyncWebhook

webhook = SyncWebhook.from_url(_DISCORD_WEBHOOK_URL) # Initializing webhook
Expand Down