]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
locks: Remove redundant CancelledError handling
authorBen Darnell <ben@bendarnell.com>
Sat, 22 Jun 2019 00:32:39 +0000 (20:32 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 22 Jun 2019 13:40:08 +0000 (09:40 -0400)
CancelledError is now always considered "quiet" (and
concurrent.futures.CancelledError is no longer the same as
asyncio.CancelledError).

tornado/locks.py

index a93e163c1f0c52b2895db6ce724bfb7e681ba763..204f0cfd773ea1c3bdf615d994463a25f741b822 100644 (file)
@@ -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.