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`.
This commit is contained in:
@@ -288,6 +288,8 @@ class ntfyerror:
|
|||||||
log.exception(
|
log.exception(
|
||||||
'Swallowed exception:', exc_info=(exc_type, exc_value, tb)
|
'Swallowed exception:', exc_info=(exc_type, exc_value, tb)
|
||||||
)
|
)
|
||||||
|
if os.environ.get('DEBUG_NTFY', '1') == '0':
|
||||||
|
return True
|
||||||
if ss := self.page.screenshot():
|
if ss := self.page.screenshot():
|
||||||
save_screenshot(ss)
|
save_screenshot(ss)
|
||||||
ntfy(
|
ntfy(
|
||||||
|
|||||||
Reference in New Issue
Block a user