From 63e69e20f64021a316bb5a3920fd82e85a86965d Mon Sep 17 00:00:00 2001 From: Barnaby Court Date: Mon, 26 Aug 2013 09:03:01 -0400 Subject: [PATCH] Fix invalid override of PulpDataException --- platform/src/pulp/client/commands/polling.py | 1 - platform/src/pulp/server/exceptions.py | 5 +---- platform/src/pulp/server/managers/consumer/agent.py | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/platform/src/pulp/client/commands/polling.py b/platform/src/pulp/client/commands/polling.py index 714b9cd7c2..588505265f 100644 --- a/platform/src/pulp/client/commands/polling.py +++ b/platform/src/pulp/client/commands/polling.py @@ -160,7 +160,6 @@ def poll(self, task_list, user_input): except Exception, e: # If any task raises an Exception and there is a error_message specified in the # task results that error should be displayed to the end user - #if task and task.result and 'error_message' in task.result: if task and task.result and 'error_message' in task.result: self.context.prompt.render_failure_message(task.result['error_message']) else: diff --git a/platform/src/pulp/server/exceptions.py b/platform/src/pulp/server/exceptions.py index 2465cf1b0a..61e2caf06d 100644 --- a/platform/src/pulp/server/exceptions.py +++ b/platform/src/pulp/server/exceptions.py @@ -197,6 +197,7 @@ def data_dict(self): # data exceptions -------------------------------------------------------------- + class PulpDataException(PulpException): """ Base class of exceptions raised due to data validation errors. @@ -204,10 +205,6 @@ class PulpDataException(PulpException): # NOTE intermediate exception class, no overrides will be provided http_status_code = httplib.BAD_REQUEST - def __init__(self, units, message=None): - PulpException.__init__(self, message) - self.units = units - class InvalidValue(PulpDataException): """ diff --git a/platform/src/pulp/server/managers/consumer/agent.py b/platform/src/pulp/server/managers/consumer/agent.py index f1c93c76c4..e5660783ba 100644 --- a/platform/src/pulp/server/managers/consumer/agent.py +++ b/platform/src/pulp/server/managers/consumer/agent.py @@ -230,7 +230,7 @@ def __invoke_plugin(self, call, *args, **kwargs): return call(*args, **kwargs) except InvalidUnitsRequested, e: trace = sys.exc_info()[2] - raise PulpDataException(e.units, e.message), None, trace + raise PulpDataException(e.message), None, trace except Exception: raise PulpExecutionException(), None, sys.exc_info()[2]