Skip to content

Commit

Permalink
Fix invalid override of PulpDataException
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabycourt committed Aug 26, 2013
1 parent c490efa commit 63e69e2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion platform/src/pulp/client/commands/polling.py
Expand Up @@ -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:
Expand Down
5 changes: 1 addition & 4 deletions platform/src/pulp/server/exceptions.py
Expand Up @@ -197,17 +197,14 @@ def data_dict(self):

# data exceptions --------------------------------------------------------------


class PulpDataException(PulpException):
"""
Base class of exceptions raised due to data validation errors.
"""
# 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):
"""
Expand Down
2 changes: 1 addition & 1 deletion platform/src/pulp/server/managers/consumer/agent.py
Expand Up @@ -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]

Expand Down

0 comments on commit 63e69e2

Please sign in to comment.