insert configHandler.checkConfig() helper in all plugins so save always same code

This commit is contained in:
Schrolli 2015-07-09 07:52:21 +02:00
parent cbb9481c5c
commit 76686e016c
7 changed files with 18 additions and 71 deletions

View file

@ -19,6 +19,8 @@ import base64 #for the HTTP request with User/Password
from includes import globals # Global variables
from includes.helper import configHandler
##
#
# onLoad (init) function of plugin
@ -98,17 +100,7 @@ def run(typ,freq,data):
@return: nothing
"""
try:
#
# ConfigParser
#
logging.debug("reading config file")
try:
for key,val in globals.config.items("BosMon"):
logging.debug(" - %s = %s", key, val)
except:
logging.error("cannot read config file")
logging.debug("cannot read config file", exc_info=True)
else: # Without config, plugin couldn't work
if configHandler.checkConfig("BosMon"): #read and debug the config
try:
#