summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-11-13 17:04:42 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-11-13 17:04:42 -0500
commit3787db7a50f70e1c8cb575546949f32c2958fe20 (patch)
treed1f35ec1e3c68cb950d84ae301e5551007fe6de5 /src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py
parentee16ced43e5050455368bb794e1fdfbba8eaa9f0 (diff)
downloadbcfg2-3787db7a50f70e1c8cb575546949f32c2958fe20.tar.gz
bcfg2-3787db7a50f70e1c8cb575546949f32c2958fe20.tar.bz2
bcfg2-3787db7a50f70e1c8cb575546949f32c2958fe20.zip
Cfg: improved error messages
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py
index 023af7d4e..b702ac899 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py
@@ -3,13 +3,10 @@
import os
import sys
import shlex
-import logging
-import Bcfg2.Server.Plugin
+from Bcfg2.Server.Plugin import PluginExecutionError
from subprocess import Popen, PIPE
from Bcfg2.Server.Plugins.Cfg import CfgVerifier, CfgVerificationError
-LOGGER = logging.getLogger(__name__)
-
class CfgExternalCommandVerifier(CfgVerifier):
""" Invoke an external script to verify
@@ -46,9 +43,6 @@ class CfgExternalCommandVerifier(CfgVerifier):
if bangpath.startswith("#!"):
self.cmd.extend(shlex.split(bangpath[2:].strip()))
else:
- msg = "%s: Cannot execute %s" % (self.__class__.__name__,
- self.name)
- LOGGER.error(msg)
- raise Bcfg2.Server.Plugin.PluginExecutionError(msg)
+ raise PluginExecutionError("Cannot execute %s" % self.name)
self.cmd.append(self.name)
handle_event.__doc__ = CfgVerifier.handle_event.__doc__