File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -519,11 +519,16 @@ def makePickle(self, record):
519519 """
520520 ei = record .exc_info
521521 if ei :
522- dummy = self .format (record ) # just to get traceback text into record.exc_text
523- record .exc_info = None # to avoid Unpickleable error
524- s = pickle .dumps (record .__dict__ , 1 )
525- if ei :
526- record .exc_info = ei # for next handler
522+ # just to get traceback text into record.exc_text ...
523+ dummy = self .format (record )
524+ # See issue #14436: If msg or args are objects, they may not be
525+ # available on the receiving end. So we convert the msg % args
526+ # to a string, save it as msg and zap the args.
527+ d = dict (record .__dict__ )
528+ d ['msg' ] = record .getMessage ()
529+ d ['args' ] = None
530+ d ['exc_info' ] = None
531+ s = pickle .dumps (d , 1 )
527532 slen = struct .pack (">L" , len (s ))
528533 return slen + s
529534
You can’t perform that action at this time.
0 commit comments