diagnostics: Fix a warning about a global use

This commit is contained in:
Sunil Mohan Adapa 2016-05-06 17:30:34 +05:30 committed by James Valleroy
parent 2f3eba4e10
commit 1489b81fee
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -70,10 +70,10 @@ def module(request, module_name):
def _start_task():
"""Start the run task in a separate thread."""
global _running_task
if _running_task:
raise Exception('Task already running')
global _running_task
_running_task = threading.Thread(target=_run_on_all_modules_wrapper)
_running_task.start()