From a8dd7dcd09aa9881947b70c02824494e331c4f2b Mon Sep 17 00:00:00 2001 From: blacktwin Date: Thu, 28 Sep 2017 15:03:19 -0400 Subject: [PATCH] Update ip_whitelist.py --- killstream/ip_whitelist.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/killstream/ip_whitelist.py b/killstream/ip_whitelist.py index f8cc09f..ffe80c6 100644 --- a/killstream/ip_whitelist.py +++ b/killstream/ip_whitelist.py @@ -43,20 +43,12 @@ plex = PlexServer(PLEX_URL, PLEX_TOKEN) def send_notification(subject_text, body_text): - # Format notification text - try: - subject = subject_text - body = body_text - - except LookupError as e: - sys.stderr.write("Unable to substitute '{0}' in the notification subject or body".format(e)) - return None # Send the notification through PlexPy payload = {'apikey': PLEXPY_APIKEY, 'cmd': 'notify', 'agent_id': AGENT_ID, - 'subject': subject, - 'body': body} + 'subject': subject_text, + 'body': body_text} try: r = requests.post(PLEXPY_URL.rstrip('/') + '/api/v2', params=payload)