Fixed log.log() to hand on the right type (str) to underlying functions.

- Legacy-Id: 17343
This commit is contained in:
Henrik Levkowetz 2020-02-26 17:16:35 +00:00
parent af0c189018
commit 03bd9c0594

View file

@ -1,4 +1,4 @@
# Copyright The IETF Trust 2007-2019, All Rights Reserved
# Copyright The IETF Trust 2007-2020, All Rights Reserved
# -*- coding: utf-8 -*-
@ -55,7 +55,7 @@ def log(msg, e=None):
elif settings.DEBUG == True:
_logfunc = debug.say
_flushfunc = sys.stdout.flush # pyflakes:ignore (intentional redefinition)
if isinstance(msg, six.text_type):
if not isinstance(msg, str):
msg = msg.encode('unicode_escape')
try:
mod, cls, func, file, line = getcaller()