Remove assert statement from non-test files (#361)

This commit is contained in:
0xMRTT 2022-09-07 18:02:07 +02:00 committed by GitHub
commit 3adc5d8979
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)