forked from release-engineering/pubtools-pulplib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherrors.py
26 lines (18 loc) · 758 Bytes
/
errors.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
class PulpException(Exception):
"""Raised when the Pulp server has responded with an unrecoverable error
(generally a failed HTTP response which persisted over several retries).
"""
class TaskFailedException(PulpException):
"""Raised when a Pulp task has completed with errors."""
def __init__(self, task):
self.task = task
"""The :class:`~pubtools.pulplib.Task` which has failed.
Error details may be accessed from the task.
"""
super(TaskFailedException, self).__init__(task.error_details)
class MissingTaskException(PulpException):
# this is not public API, this exception should be extremely rare
pass
class AmbiguousQueryException(PulpException):
# not public API
pass