mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-09-17 17:52:31 +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):
|
class RunAsync(threading.Thread):
|
||||||
def __init__(self, task_func, callback=None, *args, **kwargs):
|
def __init__(self, task_func, callback=None, *args, **kwargs):
|
||||||
self.source_id = None
|
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__(
|
super(RunAsync, self).__init__(
|
||||||
target=self.target, args=args, kwargs=kwargs)
|
target=self.target, args=args, kwargs=kwargs)
|
||||||
|
|
Loading…
Reference in a new issue