From fc8c4d81fd81b66c424480ce5aaa91bcf49809bb Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Mon, 10 Dec 2012 20:04:22 -0600 Subject: testsuite: test for exceptions raised without messages --- src/lib/Bcfg2/Server/Plugins/Packages/Source.py | 2 +- src/lib/Bcfg2/Server/Plugins/Reporting.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/Bcfg2/Server/Plugins') 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 -- cgit v1.2.3-1-g7c22