From aded5af1bd5547702a9cf366c38c0275210fc6dd Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 15 May 2020 16:18:13 +0000 Subject: [PATCH] fix remote logging cleanup code and ensure we always set the global_logging_handler to a callable to prevent further mishaps git-svn-id: https://xpra.org/svn/Xpra/trunk@26356 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/log.py | 1 + src/xpra/server/mixins/logging_server.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xpra/log.py b/src/xpra/log.py index 60c830c375..be4bf41ea4 100644 --- a/src/xpra/log.py +++ b/src/xpra/log.py @@ -141,6 +141,7 @@ def standard_logging(log, level, msg, *args, **kwargs): global_logging_handler = standard_logging def set_global_logging_handler(h): + assert callable(h) global global_logging_handler saved = global_logging_handler global_logging_handler = h diff --git a/src/xpra/server/mixins/logging_server.py b/src/xpra/server/mixins/logging_server.py index a30356b503..a81105b3ac 100644 --- a/src/xpra/server/mixins/logging_server.py +++ b/src/xpra/server/mixins/logging_server.py @@ -85,7 +85,7 @@ def stop_capturing_logging(self): ll = self.local_logging if ll: self.local_logging = None - set_global_logging_handler(self.local_logging) + set_global_logging_handler(ll) def remote_logging_handler(self, log, level, msg, *args, **kwargs):