File: //proc/thread-self/root/lib/python3/dist-packages/twisted/web/__pycache__/error.cpython-38.pyc
U
s�@g�1 � @ st d Z ddlmZmZ zddlmZ W n ek
r8 Y nX dddddd d
ddd
dgZddlm Z ddl
mZmZm
Z
mZ dd� ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e�ZG dd
� d
e�ZG dd� de�ZG d d� de�ZG d!d"� d"e�ZG d#d
� d
e�ZG d$d%� d%e�Zd&S )'z+
Exception definitions for L{twisted.web}.
� )�division�absolute_import)�ascii�Error�PageRedirect�InfiniteRedirection�RenderError�MissingRenderMethod�MissingTemplateLoader�UnexposedMethodError�UnfilledSlot�UnsupportedType�FlattenerError�RedirectWithNoLocation)� RESPONSES)�unicode�nativeString�
intToBytes�Sequencec C s0 zt �t| ��W S ttfk
r* Y dS X dS )a
Returns the response message corresponding to an HTTP code, or None
if the code is unknown or unrecognized.
@type code: L{bytes}
@param code: Refers to an HTTP status code, for example C{http.NOT_FOUND}.
@return: A string message or none
@rtype: L{bytes}
N)r �get�int�
ValueError�AttributeError)�code� r �3/usr/lib/python3/dist-packages/twisted/web/error.py�_codeToMessage s r c @ s"