mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
diagnostics: Fix a warning about a global use
This commit is contained in:
1 parent
2f3eba4e10
commit
1489b81fee
1 file changed
+1
-1
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user