1
0
Fork 0

Do not send ntfy messages when debugging

While debugging `xactfetch`, I do not need it to send me notifications
about failures, etc., since I am sitting at my computer.  To suppress
them, I can now set the `DEBUG_NTFY` environment variable to `0`.
master
Dustin 2023-12-02 13:13:13 -06:00
parent 7e8fae14e6
commit dd3f12dfa4
1 changed files with 2 additions and 0 deletions

View File

@ -288,6 +288,8 @@ class ntfyerror:
log.exception(
'Swallowed exception:', exc_info=(exc_type, exc_value, tb)
)
if os.environ.get('DEBUG_NTFY', '1') == '0':
return True
if ss := self.page.screenshot():
save_screenshot(ss)
ntfy(