From 698416d66ea32dbaea08821b5bb89ca08f086e7c Mon Sep 17 00:00:00 2001 From: JHCD Date: Sun, 14 Jun 2015 20:35:04 +0200 Subject: [PATCH] small changes in exception-handling --- includes/pluginLoader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/pluginLoader.py b/includes/pluginLoader.py index 96dffe8..31bd097 100644 --- a/includes/pluginLoader.py +++ b/includes/pluginLoader.py @@ -13,6 +13,7 @@ import logging # Global logger import imp import os +from ConfigParser import NoOptionError # we need this exception from includes import globals # Global variables def loadPlugins(): @@ -61,8 +62,10 @@ def getPlugins(): logging.debug("Plugin [ENABLED ] %s", i) else: logging.debug("Plugin [DISABLED] %s ", i) - except: # no entry for plugin found in config-file + # no entry for plugin found in config-file + except NoOptionError: logging.warning("Plugin [NO CONF ] %s", i) + pass except: logging.exception("Error during Plugin search")