Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/smanonr..../lib64/python3..../asyncio
File: exceptions.py
"""asyncio exceptions."""
[0] Fix | Delete
[1] Fix | Delete
[2] Fix | Delete
__all__ = ('CancelledError', 'InvalidStateError', 'TimeoutError',
[3] Fix | Delete
'IncompleteReadError', 'LimitOverrunError',
[4] Fix | Delete
'SendfileNotAvailableError')
[5] Fix | Delete
[6] Fix | Delete
[7] Fix | Delete
class CancelledError(BaseException):
[8] Fix | Delete
"""The Future or Task was cancelled."""
[9] Fix | Delete
[10] Fix | Delete
[11] Fix | Delete
class TimeoutError(Exception):
[12] Fix | Delete
"""The operation exceeded the given deadline."""
[13] Fix | Delete
[14] Fix | Delete
[15] Fix | Delete
class InvalidStateError(Exception):
[16] Fix | Delete
"""The operation is not allowed in this state."""
[17] Fix | Delete
[18] Fix | Delete
[19] Fix | Delete
class SendfileNotAvailableError(RuntimeError):
[20] Fix | Delete
"""Sendfile syscall is not available.
[21] Fix | Delete
[22] Fix | Delete
Raised if OS does not support sendfile syscall for given socket or
[23] Fix | Delete
file type.
[24] Fix | Delete
"""
[25] Fix | Delete
[26] Fix | Delete
[27] Fix | Delete
class IncompleteReadError(EOFError):
[28] Fix | Delete
"""
[29] Fix | Delete
Incomplete read error. Attributes:
[30] Fix | Delete
[31] Fix | Delete
- partial: read bytes string before the end of stream was reached
[32] Fix | Delete
- expected: total number of expected bytes (or None if unknown)
[33] Fix | Delete
"""
[34] Fix | Delete
def __init__(self, partial, expected):
[35] Fix | Delete
r_expected = 'undefined' if expected is None else repr(expected)
[36] Fix | Delete
super().__init__(f'{len(partial)} bytes read on a total of '
[37] Fix | Delete
f'{r_expected} expected bytes')
[38] Fix | Delete
self.partial = partial
[39] Fix | Delete
self.expected = expected
[40] Fix | Delete
[41] Fix | Delete
def __reduce__(self):
[42] Fix | Delete
return type(self), (self.partial, self.expected)
[43] Fix | Delete
[44] Fix | Delete
[45] Fix | Delete
class LimitOverrunError(Exception):
[46] Fix | Delete
"""Reached the buffer limit while looking for a separator.
[47] Fix | Delete
[48] Fix | Delete
Attributes:
[49] Fix | Delete
- consumed: total number of to be consumed bytes.
[50] Fix | Delete
"""
[51] Fix | Delete
def __init__(self, message, consumed):
[52] Fix | Delete
super().__init__(message)
[53] Fix | Delete
self.consumed = consumed
[54] Fix | Delete
[55] Fix | Delete
def __reduce__(self):
[56] Fix | Delete
return type(self), (self.args[0], self.consumed)
[57] Fix | Delete
[58] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function