Brought excluded code into the scope of a try block in SysLogHandler.emit().
This commit is contained in:
parent
409062c669
commit
a79d6f40df
|
@ -840,6 +840,7 @@ class SysLogHandler(logging.Handler):
|
|||
The record is formatted, and then sent to the syslog server. If
|
||||
exception information is present, it is NOT sent to the server.
|
||||
"""
|
||||
try:
|
||||
msg = self.format(record) + '\000'
|
||||
"""
|
||||
We need to convert record level to lowercase, maybe this will
|
||||
|
@ -851,7 +852,6 @@ class SysLogHandler(logging.Handler):
|
|||
if type(msg) is unicode:
|
||||
msg = msg.encode('utf-8')
|
||||
msg = prio + msg
|
||||
try:
|
||||
if self.unixsocket:
|
||||
try:
|
||||
self.socket.send(msg)
|
||||
|
|
|
@ -37,6 +37,9 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #22776: Brought excluded code into the scope of a try block in
|
||||
SysLogHandler.emit().
|
||||
|
||||
- Issue #17381: Fixed ranges handling in case-insensitive regular expressions.
|
||||
|
||||
- Issue #19329: Optimized compiling charsets in regular expressions.
|
||||
|
|
Loading…
Reference in New Issue