Don't try to get results from dead task

This commit is contained in:
Oleksii Shevchuk 2017-06-06 16:19:42 +03:00
parent 8cc46ed990
commit d080e9297a
1 changed files with 2 additions and 1 deletions

View File

@ -288,7 +288,7 @@ class Task(threading.Thread):
@property @property
def active(self): def active(self):
if not self._stopped: if self._stopped is None:
return False return False
try: try:
@ -296,6 +296,7 @@ class Task(threading.Thread):
except: except:
print_exception('[T/A:{}]'.format(self.name)) print_exception('[T/A:{}]'.format(self.name))
return False
def event(self, event): def event(self, event):
pass pass