diff --git a/plinth/actions.py b/plinth/actions.py index 689dc58c1..d1ab50d2c 100644 --- a/plinth/actions.py +++ b/plinth/actions.py @@ -369,7 +369,6 @@ class JSONEncoder(json.JSONEncoder): def _setup_thread_storage(): """Setup collection of stdout/stderr from any process in this thread.""" - global thread_storage thread_storage.stdout = b'' thread_storage.stderr = b'' @@ -380,14 +379,12 @@ def _clear_thread_storage(): Python documentation is silent on whether thread local storage will be cleaned up after a thread terminates. """ - global thread_storage thread_storage.stdout = None thread_storage.stderr = None def get_return_value_from_exception(exception): """Return the value to return from server when an exception is raised.""" - global thread_storage return_value = { 'result': 'exception', 'exception': { diff --git a/plinth/privileged_daemon.py b/plinth/privileged_daemon.py index 3b31ec900..f5120ec25 100644 --- a/plinth/privileged_daemon.py +++ b/plinth/privileged_daemon.py @@ -260,7 +260,6 @@ def _shutdown_server() -> None: This must be run in a thread separate from the server.serve_forever() otherwise it will deadlock waiting for the shutdown to complete. """ - global _server logger.info('SIGTERM received, shutting down the server.') if _server: _server.shutdown()