mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-08-23 16:02:33 +00:00
Remove assert statement from non-test files
This commit is contained in:
parent
de359b64bb
commit
a4cdaf0bed
1 changed files with 2 additions and 1 deletions
|
@ -29,7 +29,8 @@ from .modules.utils import buglog
|
|||
class RunAsync(threading.Thread):
|
||||
def __init__(self, task_func, callback=None, *args, **kwargs):
|
||||
self.source_id = None
|
||||
assert threading.current_thread() is threading.main_thread()
|
||||
if threading.current_thread() is not threading.main_thread():
|
||||
raise AssertionError
|
||||
|
||||
super(RunAsync, self).__init__(
|
||||
target=self.target, args=args, kwargs=kwargs)
|
||||
|
|
Loading…
Reference in a new issue