summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-02-13 16:30:47 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-02-13 16:30:47 -0500
commitb4d6a72ae4db7a5b83415b6fcf632ed04475fb09 (patch)
tree3c6392a387f28c8a0cb0f6893cdfdb8817c36f4c /src/lib/Bcfg2/Server
parent7241066deea16a9ebba718d7ecd157891e23cf33 (diff)
downloadbcfg2-b4d6a72ae4db7a5b83415b6fcf632ed04475fb09.tar.gz
bcfg2-b4d6a72ae4db7a5b83415b6fcf632ed04475fb09.tar.bz2
bcfg2-b4d6a72ae4db7a5b83415b6fcf632ed04475fb09.zip
fixed unit tests
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py
index 8e2d98db9..313e53ee9 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgExternalCommandVerifier.py
@@ -26,13 +26,10 @@ class CfgExternalCommandVerifier(CfgVerifier):
out, err = proc.communicate(input=data)
rv = proc.wait()
if rv != 0:
- if not err:
- if out:
- # got nothing on stderr, try stdout
- err = out
- else:
- err = "Non-zero return value %s" % rv
- raise CfgVerificationError(err.strip())
+ # pylint: disable=E1103
+ raise CfgVerificationError(err.strip() or out.strip() or
+ "Non-zero return value %s" % rv)
+ # pylint: enable=E1103
except CfgVerificationError:
raise
except: