[issue26803] syslog logging handler fails with address in unix abstract namespace

Xavier de Gaye report at bugs.python.org
Wed Apr 20 06:28:42 EDT 2016


Xavier de Gaye added the comment:

The SysLogHandlerTest class instantiates a 'server_class' that eventually calls the
server_bind() method of the TCPServer class of the socketserver module.

This server_bind() method executes the statements:

    self.socket.bind(self.server_address)
    self.server_address = self.socket.getsockname()

and when self.server_address is a string and contains a null byte, then
getsockname() returns a bytes object.

So finally, self.server in SysLogHandlerTest is a bytes object in this case,
hence the needed to fix Lib/logging/handlers.py.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26803>
_______________________________________


More information about the Python-bugs-list mailing list