mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Merge pull request #248 from Data-Monkey/split_it_up
fix issue #4 by @Data-Monkey
This commit is contained in:
@@ -32,6 +32,12 @@ def send (msg: noti_struc):
|
||||
# add authorization header with hash
|
||||
headers["Authorization"] = "Basic {}".format(basichash)
|
||||
|
||||
requests.post("{}/{}".format( conf.NTFY_HOST, conf.NTFY_TOPIC),
|
||||
data=msg.html,
|
||||
headers=headers)
|
||||
try:
|
||||
requests.post("{}/{}".format( conf.NTFY_HOST, conf.NTFY_TOPIC),
|
||||
data=msg.html,
|
||||
headers=headers)
|
||||
except requests.exceptions.RequestException as e:
|
||||
mylog('none', ['[NTFY] Error: ', e])
|
||||
return -1
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user