changed apprise client
This commit is contained in:
parent
8509269085
commit
43c79b13ca
@ -10,20 +10,17 @@ def apprise_notify(req_obj, host, port, aurls, title, body):
|
|||||||
|
|
||||||
class AppriseClient:
|
class AppriseClient:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.config = ''
|
if os.getenv("DOCKER"):
|
||||||
try:
|
self.host = os.getenv("host")
|
||||||
if os.get["DOCKER"]:
|
self.port = os.getenv("port")
|
||||||
self.host = os.environ["host"]
|
self.aurls = os.getenv("aurls")
|
||||||
self.port = os.environ["port"]
|
self.title = os.getenv("title")
|
||||||
self.aurls = os.environ["aurls"]
|
self.body = os.getenv("body")
|
||||||
self.title = os.environ["title"]
|
if os.getenv("toml_path"):
|
||||||
self.body = os.environ["body"]
|
config_file_path=os.getenv("toml_path")
|
||||||
if os.environ["toml_path"]:
|
|
||||||
config_file_path=os.environ["toml_path"]
|
|
||||||
with open(config_file_path, 'rb') as c:
|
with open(config_file_path, 'rb') as c:
|
||||||
self.config = load(c)
|
self.config = load(c)
|
||||||
except:
|
|
||||||
KeyError
|
|
||||||
if os.path.exists('./config.toml'):
|
if os.path.exists('./config.toml'):
|
||||||
config_file_path = './config.toml'
|
config_file_path = './config.toml'
|
||||||
with open(config_file_path, 'rb') as c:
|
with open(config_file_path, 'rb') as c:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user