Skip to content

Commit

Permalink
[grottext] adopt reviewer suggestion
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Fiddian-Green <[email protected]>
  • Loading branch information
andrewfg authored and ChimpDW committed Oct 7, 2023
1 parent d632eaf commit 636d7e5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/Extensions/grottext.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ def grottext(conf,data,jsonmsg) :
#print(dir(conf))
#print(conf.extvar)

url = "http://" + conf.extvar["ip"] + ":" + str(conf.extvar["port"])

fullurl = conf.extvar["url"]

if fullurl:
url = fullurl
if "url" in conf.extvar:
url = conf.extvar["url"]
else:
url = "http://" + conf.extvar["ip"] + ":" + str(conf.extvar["port"])

try:
r = requests.post(url, json = jsonmsg)
Expand Down

0 comments on commit 636d7e5

Please sign in to comment.