diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py index da82091ebb9..8271f70e445 100644 --- a/aiohttp/client_reqrep.py +++ b/aiohttp/client_reqrep.py @@ -556,7 +556,7 @@ async def write_bytes( new_exc.__context__ = exc new_exc.__cause__ = exc protocol.set_exception(new_exc) - except asyncio.CancelledError as exc: + except asyncio.CancelledError: await writer.write_eof() except Exception as exc: protocol.set_exception(exc)