From c6c2950ed6920562bc980fae38c37c7e6b05ee4c Mon Sep 17 00:00:00 2001 From: Guy Van Sanden Date: Wed, 20 Mar 2024 11:46:46 +0100 Subject: [PATCH] Support notify in config --- src/config.json.dist | 1 + src/tellme.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/config.json.dist b/src/config.json.dist index 5ac0f47..3e5dd75 100644 --- a/src/config.json.dist +++ b/src/config.json.dist @@ -1,4 +1,5 @@ { "url": "", "webhook": "", + "notify": "", } diff --git a/src/tellme.py b/src/tellme.py index c892643..148bd23 100755 --- a/src/tellme.py +++ b/src/tellme.py @@ -74,7 +74,14 @@ baseurl = config['url'] webhook = config['webhook'] message = args.message -notify = args.notify + +notify = None +if args.notify is None: + if config.get('notify') is not None: + notify = config.get('notify') +else: + notify = args.notify + ran = False if args.pid != 0: