From 35ef92f8dabd8c373cc5ee06e3d71b51a9becf65 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 1 Apr 2016 10:44:07 +0200 Subject: [PATCH] Fix AttributeError in setDaemon in threading module --- direct/src/stdpy/threading.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/direct/src/stdpy/threading.py b/direct/src/stdpy/threading.py index b3f2bc57bd..1ec3b83f5f 100644 --- a/direct/src/stdpy/threading.py +++ b/direct/src/stdpy/threading.py @@ -53,12 +53,6 @@ class ThreadBase: def getName(self): return self.name - def is_alive(self): - return self.__thread.isStarted() - - def isAlive(self): - return self.__thread.isStarted() - def isDaemon(self): return self.daemon @@ -115,6 +109,12 @@ class Thread(ThreadBase): if _thread and _thread._remove_thread_id: _thread._remove_thread_id(self.ident) + def is_alive(self): + return self.__thread.isStarted() + + def isAlive(self): + return self.__thread.isStarted() + def start(self): if self.__thread.isStarted(): raise RuntimeError @@ -152,6 +152,12 @@ class ExternalThread(ThreadBase): self.__dict__['name'] = self.__thread.getName() self.__dict__['ident'] = threadId + def is_alive(self): + return self.__thread.isStarted() + + def isAlive(self): + return self.__thread.isStarted() + def start(self): raise RuntimeError