diff --git a/tools/run-mypy b/tools/run-mypy index 513ecc2bc4..7cddff9149 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -51,7 +51,6 @@ zerver/lib/email_mirror.py zerver/lib/notifications.py zerver/lib/parallel.py zerver/lib/test_helpers.py -zerver/lib/timeout.py zerver/lib/tornado_ioloop_logging.py zerver/management/commands/create_stream.py zerver/management/commands/email-mirror.py diff --git a/zerver/lib/timeout.py b/zerver/lib/timeout.py index f6d75d8762..5122b8f7bb 100644 --- a/zerver/lib/timeout.py +++ b/zerver/lib/timeout.py @@ -74,7 +74,7 @@ def timeout(timeout, func, *args, **kwargs): thread.start() thread.join(timeout) - if thread.isAlive(): + if thread.is_alive(): # Gamely try to kill the thread, following the dodgy approach from # http://stackoverflow.com/a/325528/90777 # @@ -83,7 +83,7 @@ def timeout(timeout, func, *args, **kwargs): for i in range(10): thread.raise_async_timeout() time.sleep(0.1) - if not thread.isAlive(): + if not thread.is_alive(): break raise TimeoutExpired