BOSWatch/plugins/template/template.py

27 lines
641 B
Python
Raw Normal View History

#!/usr/bin/python
# -*- coding: cp1252 -*-
import logging # Global logger
import globals # Global variables
2015-05-18 14:56:01 +02:00
def run(typ,freq,data):
2015-05-18 22:10:23 +02:00
try:
#ConfigParser
logging.debug("reading config file")
try:
2015-05-20 14:26:17 +02:00
for key,val in globals.config.items("BOSWatch"):
logging.debug(" - %s = %s", key, val)
except:
logging.exception("cannot read config file")
2015-05-19 12:58:13 +02:00
if typ == "FMS":
2015-05-20 14:26:17 +02:00
logging.debug(typ + " not supported")
2015-05-19 12:58:13 +02:00
elif typ == "ZVEI":
2015-05-20 14:26:17 +02:00
logging.debug(typ + " not supported")
2015-05-19 12:58:13 +02:00
elif typ == "POC":
2015-05-20 14:26:17 +02:00
logging.debug(typ + " not supported")
else:
2015-05-20 14:26:17 +02:00
logging.warning(typ + " not supported")
2015-05-19 12:58:13 +02:00
2015-05-18 22:10:23 +02:00
except:
2015-05-19 12:58:13 +02:00
logging.exception("unknown error")