From: Ben Darnell Date: Sat, 22 Jun 2019 00:32:39 +0000 (-0400) Subject: locks: Remove redundant CancelledError handling X-Git-Tag: v6.1.0b1~68^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ba49c10d457200845ae0c0b44095f67f88cc5b0;p=thirdparty%2Ftornado.git locks: Remove redundant CancelledError handling CancelledError is now always considered "quiet" (and concurrent.futures.CancelledError is no longer the same as asyncio.CancelledError). --- diff --git a/tornado/locks.py b/tornado/locks.py index a93e163c1..204f0cfd7 100644 --- a/tornado/locks.py +++ b/tornado/locks.py @@ -13,7 +13,6 @@ # under the License. import collections -from concurrent.futures import CancelledError import datetime import types @@ -250,9 +249,7 @@ class Event(object): if timeout is None: return fut else: - timeout_fut = gen.with_timeout( - timeout, fut, quiet_exceptions=(CancelledError,) - ) + timeout_fut = gen.with_timeout(timeout, fut) # This is a slightly clumsy workaround for the fact that # gen.with_timeout doesn't cancel its futures. Cancelling # fut will remove it from the waiters list.