diff options
Diffstat (limited to 'Lib/asyncio/exceptions.py')
-rw-r--r-- | Lib/asyncio/exceptions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/exceptions.py b/Lib/asyncio/exceptions.py index e03602e..f07e448 100644 --- a/Lib/asyncio/exceptions.py +++ b/Lib/asyncio/exceptions.py @@ -34,8 +34,9 @@ class IncompleteReadError(EOFError): - expected: total number of expected bytes (or None if unknown) """ def __init__(self, partial, expected): + r_expected = 'undefined' if expected is None else repr(expected) super().__init__(f'{len(partial)} bytes read on a total of ' - f'{expected!r} expected bytes') + f'{r_expected} expected bytes') self.partial = partial self.expected = expected |