overide/fallback clean up.

This commit is contained in:
Blacktwin 2018-06-12 15:51:08 -04:00
parent 0d40df2755
commit c93972f46c

View File

@ -43,22 +43,14 @@ import argparse
import sys
import os
TAUTULLI_FALLBACK_URL = ''
TAUTULLI_FALLBACK_APIKEY = ''
TAUTULLI_URL = os.getenv('TAUTULLI_URL', TAUTULLI_FALLBACK_URL)
TAUTULLI_APIKEY = os.getenv('TAUTULLI_APIKEY', TAUTULLI_FALLBACK_APIKEY)
TAUTULLI_OVERRIDE_URL = ''
TAUTULLI_OVERRIDE_API = ''
TAUTULLI_URL = ''
TAUTULLI_APIKEY = ''
TAUTULLI_URL = os.getenv('TAUTULLI_URL', TAUTULLI_URL)
TAUTULLI_APIKEY = os.getenv('TAUTULLI_APIKEY', TAUTULLI_APIKEY)
SUBJECT_TEXT = "Tautulli has killed a stream."
BODY_TEXT = "Killed {user}'s stream. Reason: {message}."
if TAUTULLI_OVERRIDE_URL:
TAUTULLI_URL = TAUTULLI_OVERRIDE_URL
if TAUTULLI_OVERRIDE_API:
TAUTULLI_APIKEY = TAUTULLI_OVERRIDE_API
sess = requests.Session()
# Ignore verifying the SSL certificate
sess.verify = False # '/path/to/certfile'