Remove 3.7 workarounds

This commit is contained in:
Lonami Exo
2022-01-09 13:03:02 +01:00
parent be6508dc5d
commit 691160bd92
2 changed files with 11 additions and 32 deletions

View File

@@ -263,15 +263,14 @@ class Connection(abc.ABC):
if self._writer:
self._writer.close()
if sys.version_info >= (3, 7):
try:
await self._writer.wait_closed()
except Exception as e:
# Disconnecting should never raise. Seen:
# * OSError: No route to host and
# * OSError: [Errno 32] Broken pipe
# * ConnectionResetError
self._log.info('%s during disconnect: %s', type(e), e)
try:
await self._writer.wait_closed()
except Exception as e:
# Disconnecting should never raise. Seen:
# * OSError: No route to host and
# * OSError: [Errno 32] Broken pipe
# * ConnectionResetError
self._log.info('%s during disconnect: %s', type(e), e)
def send(self, data):
"""