Skip to content

Commit

Permalink
error handler could cause yet more errors
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Oct 12, 2022
1 parent c668982 commit a526354
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xpra/server/mixins/logging_server.py
Expand Up @@ -93,11 +93,12 @@ def remote_logging_handler(self, log, level, msg, *args, **kwargs):
assert self.local_logging
def local_warn(*args):
self.local_logging(log, logging.WARNING, *args)
def local_err(message):
def local_err(message, e=None):
if self._closing:
return
local_warn("Warning: %s:", message)
local_warn(" %s" % e)
if e:
local_warn(" %s", e)
local_warn(" original unformatted message: %s", msg)
if args:
local_warn(" %i arguments: %s", len(args), args)
Expand All @@ -122,7 +123,7 @@ def local_err(message):
else:
data = msg
except Exception as e:
local_err("failed to format log message")
local_err("failed to format log message", e)
return
for proto, start_time in self.logging_clients.items():
source = self.get_server_source(proto)
Expand Down

0 comments on commit a526354

Please sign in to comment.