bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)

This commit is contained in:
Andrew Svetlov 2018-09-11 10:13:04 -07:00 committed by GitHub
parent 7c7605ff11
commit 0baa72f4b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 148 additions and 110 deletions

View file

@ -12,6 +12,7 @@ import weakref
from . import events
from . import base_subprocess
from . import futures
from . import exceptions
from . import proactor_events
from . import selector_events
from . import tasks
@ -351,7 +352,7 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
elif self._debug:
logger.warning("Accept pipe failed on pipe %r",
pipe, exc_info=True)
except futures.CancelledError:
except exceptions.CancelledError:
if pipe:
pipe.close()
else:
@ -497,7 +498,7 @@ class IocpProactor:
# Coroutine closing the accept socket if the future is cancelled
try:
await future
except futures.CancelledError:
except exceptions.CancelledError:
conn.close()
raise