restore isAlive method removed in python 3.9

This commit is contained in:
Sergey G. Brester 2020-03-06 19:41:16 +01:00 committed by GitHub
parent 781a25512b
commit 55e76c0b80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,3 +120,6 @@ class JailThread(Thread):
## python 2.x replace binding of private __bootstrap method:
if sys.version_info < (3,): # pragma: 3.x no cover
JailThread._Thread__bootstrap = JailThread._JailThread__bootstrap
## python 3.9, restore isAlive method:
elif not hasattr(JailThread, 'isAlive'): # pragma: 2.x no cover
JailThread.isAlive = JailThread.is_alive