diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-12-10 20:04:22 -0600 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-12-10 20:04:22 -0600 |
commit | fc8c4d81fd81b66c424480ce5aaa91bcf49809bb (patch) | |
tree | a9fbadf3975e9036a9f2df71c655fe615796fa70 /src/lib/Bcfg2/Server | |
parent | 9d6e6241954d001a5b49e4ea9a48c10e2a792958 (diff) | |
download | bcfg2-fc8c4d81fd81b66c424480ce5aaa91bcf49809bb.tar.gz bcfg2-fc8c4d81fd81b66c424480ce5aaa91bcf49809bb.tar.bz2 bcfg2-fc8c4d81fd81b66c424480ce5aaa91bcf49809bb.zip |
testsuite: test for exceptions raised without messages
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Packages/Source.py | 2 | ||||
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Reporting.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py index b98070ca9..985405e65 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py @@ -67,7 +67,7 @@ def fetch_url(url): if '@' in url: mobj = re.match('(\w+://)([^:]+):([^@]+)@(.*)$', url) if not mobj: - raise ValueError + raise ValueError("Invalid URL") user = mobj.group(2) passwd = mobj.group(3) url = mobj.group(1) + mobj.group(4) diff --git a/src/lib/Bcfg2/Server/Plugins/Reporting.py b/src/lib/Bcfg2/Server/Plugins/Reporting.py index 60f5b1e09..d072f1a33 100644 --- a/src/lib/Bcfg2/Server/Plugins/Reporting.py +++ b/src/lib/Bcfg2/Server/Plugins/Reporting.py @@ -1,5 +1,6 @@ """ Unified statistics and reporting plugin """ +import sys import time import platform import traceback @@ -27,7 +28,7 @@ def _rpc_call(method): return self.transport.rpc(method, *args, **kwargs) except TransportError: # this is needed for Admin.Pull - raise PluginExecutionError + raise PluginExecutionError(sys.exc_info()[1]) return _real_rpc_call |