load modules after config
This commit is contained in:
@@ -202,7 +202,7 @@ def pushmsg(msg):
|
|||||||
if pushsrv in ["all", "pushover"]:
|
if pushsrv in ["all", "pushover"]:
|
||||||
pushover(msg)
|
pushover(msg)
|
||||||
if pushsrv in ["all","mattermost"]:
|
if pushsrv in ["all","mattermost"]:
|
||||||
return pushmattermost(msg)
|
pushmattermost(msg)
|
||||||
if pushsrv in ["all"]:
|
if pushsrv in ["all"]:
|
||||||
print("notice:", msg)
|
print("notice:", msg)
|
||||||
|
|
||||||
@@ -839,13 +839,6 @@ for o, a in optlist:
|
|||||||
DEBUG += 1
|
DEBUG += 1
|
||||||
cmdargs += [o]
|
cmdargs += [o]
|
||||||
|
|
||||||
if pushsrv in ["all", "mattermost"]:
|
|
||||||
try:
|
|
||||||
from mattermostdriver import Driver
|
|
||||||
except:
|
|
||||||
print("warning: mattermostdriver python module missing, reverting to pushover")
|
|
||||||
pushsrv = "pushover"
|
|
||||||
|
|
||||||
|
|
||||||
if helpflag:
|
if helpflag:
|
||||||
print("hbc HeartBeatDaemon")
|
print("hbc HeartBeatDaemon")
|
||||||
@@ -943,9 +936,17 @@ if len(args) != 0:
|
|||||||
print("error: args")
|
print("error: args")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
if pushsrv in ["all", "mattermost"]:
|
||||||
|
try:
|
||||||
|
from mattermostdriver import Driver
|
||||||
|
except:
|
||||||
|
print("warning: mattermostdriver python module missing, reverting to pushover")
|
||||||
|
pushsrv = "pushover"
|
||||||
|
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
print(("notice: logging to %s" % logfile))
|
print("notice: logging to %s" % logfile)
|
||||||
|
print("notice: push service is %s" % pushsrv)
|
||||||
logf = initlog(logfile)
|
logf = initlog(logfile)
|
||||||
|
|
||||||
if 1 and os.path.exists(pickfile):
|
if 1 and os.path.exists(pickfile):
|
||||||
|
|||||||
Reference in New Issue
Block a user