Add back code logic that pyupgrade removed.

We still need this for salt-ssh

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-08-17 20:34:21 +01:00
parent e8a392577d
commit a6cb942a3b
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -275,16 +275,29 @@ class SaltLoggingClass(LOGGING_LOGGER_CLASS, metaclass=LoggingMixinMeta):
else:
extra["exc_info_on_loglevel"] = exc_info_on_loglevel
LOGGING_LOGGER_CLASS._log(
self,
level,
msg,
args,
exc_info=exc_info,
extra=extra,
stack_info=stack_info,
stacklevel=stacklevel,
)
try:
LOGGING_LOGGER_CLASS._log(
self,
level,
msg,
args,
exc_info=exc_info,
extra=extra,
stack_info=stack_info,
stacklevel=stacklevel,
)
except TypeError:
# Python < 3.8 - We still need this for salt-ssh since it will use
# the system python, and not out onedir.
LOGGING_LOGGER_CLASS._log(
self,
level,
msg,
args,
exc_info=exc_info,
extra=extra,
stack_info=stack_info,
)
def makeRecord(
self,