Skip to content

Commit

Permalink
Notification failure details
Browse files Browse the repository at this point in the history
Made it so that more info is given if a notification fails to send.
  • Loading branch information
TrevorBagels authored Dec 8, 2021
1 parent 6b08558 commit e2d91d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dev/event_modules/events_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def important_incident_found(self, incident:D.Incident, location:CfgLocation, im

self.main.print(message, t='important')
return
p.notify(user=self.main.config.pushover_user, token=self.main.config.pushover_token, message=message)
notif = p.notify(user=self.main.config.pushover_user, token=self.main.config.pushover_token, message=message)
if notif.ok == False:
self.main.print(f"ERROR SENDING NOTIFICATION!\nNotification Status: {notif.status}\nErrors: {' | '.join(notif.errors)}", t='bad')
pass


Expand Down

0 comments on commit e2d91d9

Please sign in to comment.