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
parent
7e8fae14e6
commit
dd3f12dfa4
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue