also listen on IPv6

This commit is contained in:
2015-01-06 15:44:22 +01:00
parent 637123a780
commit d0a98d9b0e
+9 -7
View File
@@ -165,13 +165,15 @@ def pushover(msg):
if not SEND_PUSHOVER: if not SEND_PUSHOVER:
return return
conn = httplib.HTTPSConnection("api.pushover.net:443") conn = httplib.HTTPSConnection("api.pushover.net:443")
conn.request("POST", "/1/messages.json", try:
urllib.urlencode({ conn.request("POST", "/1/messages.json",
"token": "ac7NLX2rPjXFareeDgLpXNoDf4iFmf", urllib.urlencode({
"user": "uDhH33UjQQDYtNzJb1ThRiWb9ingGK", "token": "ac7NLX2rPjXFareeDgLpXNoDf4iFmf",
"message": msg, "user": "uDhH33UjQQDYtNzJb1ThRiWb9ingGK",
}), { "Content-type": "application/x-www-form-urlencoded" }) "message": msg, }), { "Content-type": "application/x-www-form-urlencoded" })
conn.getresponse() conn.getresponse()
except:
pass
# nsupdate: set the DNS A record for a fqdn # nsupdate: set the DNS A record for a fqdn