OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
twisted
/
protocols
/
haproxy
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/31/2022 06:22:38 AM
rwxr-xr-x
📄
__init__.py
251 bytes
09/08/2017 10:38:35 AM
rw-r--r--
📁
__pycache__
-
03/31/2022 06:22:39 AM
rwxr-xr-x
📄
_exceptions.py
1.06 KB
09/08/2017 10:38:35 AM
rw-r--r--
📄
_info.py
929 bytes
09/08/2017 10:38:35 AM
rw-r--r--
📄
_interfaces.py
1.75 KB
09/08/2017 10:38:35 AM
rw-r--r--
📄
_parser.py
2 KB
09/08/2017 10:38:35 AM
rw-r--r--
📄
_v1parser.py
4.22 KB
09/08/2017 10:38:35 AM
rw-r--r--
📄
_v2parser.py
6.16 KB
09/08/2017 10:38:35 AM
rw-r--r--
📄
_wrapper.py
3.25 KB
09/08/2017 10:38:35 AM
rw-r--r--
📁
test
-
03/31/2022 06:22:38 AM
rwxr-xr-x
Editing: _exceptions.py
Close
# -*- test-case-name: twisted.protocols.haproxy.test -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ HAProxy specific exceptions. """ import contextlib import sys from twisted.python import compat class InvalidProxyHeader(Exception): """ The provided PROXY protocol header is invalid. """ class InvalidNetworkProtocol(InvalidProxyHeader): """ The network protocol was not one of TCP4 TCP6 or UNKNOWN. """ class MissingAddressData(InvalidProxyHeader): """ The address data is missing or incomplete. """ @contextlib.contextmanager def convertError(sourceType, targetType): """ Convert an error into a different error type. @param sourceType: The type of exception that should be caught and converted. @type sourceType: L{Exception} @param targetType: The type of exception to which the original should be converted. @type targetType: L{Exception} """ try: yield None except sourceType: compat.reraise(targetType(), sys.exc_info()[-1])