mirror of
https://github.com/Operator873/Nagios-Discord.git
synced 2025-10-29 11:50:06 +00:00
Issue #3 - fix urllib.parse error
This commit is contained in:
parent
9cebb8bc27
commit
5250e0c6e1
@ -26,7 +26,7 @@ def codecolor(alerttype):
|
||||
def main(nag_in):
|
||||
_cmd = nag_in.pop(0)
|
||||
data = {KEYS[i]: nag_in[i] for i in range(len(KEYS))}
|
||||
host = urllib.parse(data["host"])
|
||||
host = urllib.parse.quote(data["host"])
|
||||
|
||||
link = f"https://{DOMAIN}/nagios/cgi-bin/extinfo.cgi?type=2&host={host}"
|
||||
|
||||
|
||||
@ -26,8 +26,8 @@ def codecolor(alerttype):
|
||||
def main(nag_in):
|
||||
_cmd = nag_in.pop(0)
|
||||
data = {KEYS[i]: nag_in[i] for i in range(len(KEYS))}
|
||||
host = urllib.parse(data["host"])
|
||||
serv = urllib.parse(data["servdesc"])
|
||||
host = urllib.parse.quote(data["host"])
|
||||
serv = urllib.parse.quote(data["servdesc"])
|
||||
|
||||
link = (
|
||||
f"https://{DOMAIN}/nagios/cgi-bin/extinfo.cgi?type=2&host={host}&service={serv}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user