/usr/lib/python3/dist-packages/lazr/restfulclient/__pycache__
Edit: /usr/lib/python3/dist-packages/lazr/restfulclient/__pycache__/errors.cpython-310.pyc (4446B)
o
3O @ s d Z eZg dZG dd deZG dd deZG dd deZG dd d eZG d
d deZ G dd
d
eZ
G dd de
ZG dd deZG dd deZ
G dd deZG dd deZG dd deZG dd deZG dd de
Zdd Zd S )!zlazr.restfulclient errors.)
BadRequestConflictClientErrorCredentialsErrorCredentialsFileError HTTPErrorMethodNotAllowedNotFoundPreconditionFailedRestfulError
ResponseErrorServerErrorUnauthorizedUnexpectedResponseErrorc @ e Zd ZdZdS )r
z2Base error for the lazr.restfulclient API library.N__name__
__module____qualname____doc__ r r ;/usr/lib/python3/dist-packages/lazr/restfulclient/errors.pyr
( r
c @ r )r z&Base credentials/authentication error.Nr r r r r r , r r c @ r )r zError in credentials file.Nr r r r r r 0 r r c @ e Zd ZdZdd ZdS )r zError in response.c C s t | || _|| _d S )N)r
__init__responsecontent)selfr r r r r r 7 s
zResponseError.__init__N)r r r r r r r r r r 4 r c @ r )r z$An unexpected response was received.c C s d| j j| j jf S )N%s: %s)r statusreason)r r r r __str__@ s zUnexpectedResponseError.__str__Nr r r r r! r r r r r = r r c @ r )r z+An HTTP non-2xx response code was received.c C s8 d dd t| j D }d| jj| jj|| jf S )z9Show the error code, response headers, and response body.
c S s g | ]}d | qS )r r ).0pairr r r
I s z%HTTPError.__str__..zIHTTP Error %s: %s
Response headers:
---
%s
---
Response body:
---
%s
---
)joinsortedr itemsr r r )r headersr r r r! G s
zHTTPError.__str__Nr" r r r r r D r r c @ r )r z.An exception representing a client-side error.Nr r r r r r Q r r c @ r )r
z4An exception representing an authentication failure.Nr r r r r r
U r r
c @ r )r z1An exception representing a nonexistent resource.Nr r r r r r Y r r c @ r )r zAn exception raised when you use an unsupported HTTP method.
This is most likely because you tried to delete a resource that
can't be deleted.
Nr r r r r r ] r r c @ r )r z:An exception representing a problem with a client request.Nr r r r r r e r r c @ r )r z9An exception representing a conflict with another client.Nr r r r r r i r r c @ r )r zAn exception representing the failure of a conditional PUT/PATCH.
The most likely explanation is that another client changed this
object while you were working on it, and your version of the
object is now out of date.
Nr r r r r r m r r c @ r )r z.An exception representing a server-side error.Nr r r r r r u r r c C sj t tttttd}| jd dkrdS || jt}|tu r0| jd dkr't }n | jd dkr0t
}|| |S )zTurn an HTTP response into an HTTPError subclass.
:return: None if the response code is 1xx, 2xx or 3xx. Otherwise,
an instance of an appropriate HTTPError subclass (or HTTPError
if nothing else is appropriate.
)i i i i i i d N )r r
r r r r r getr r r )r r http_errors_by_status_codeclsr r r error_fory s
r2 N)r type
__metaclass____all__ Exceptionr
r r r r r r r
r r r r r r r2 r r r r s$