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

@ -17,6 +17,8 @@ import socket
from includes import globals # Global variables
from includes.helper import configHandler
###
#
# onLoad (init) function of plugin
@ -59,17 +61,7 @@ def run(typ,freq,data):
@return: nothing
"""
try:
#
#ConfigParser
#
logging.debug("reading config file")
try:
for key,val in globals.config.items("firEmergency"):
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("firEmergency"): #read and debug the config
try:
#