Charles-François Natali added the comment: > Here's a patch.
Your patch returns an empty string in case of Linux abstract namespace: this is wrong, because even though the first char in sun_path is NIL, the path is non-null, there can be other non-NIL char following. Example (the output returns a str because it's a Python 2.6 version): >>> import socket >>> s = socket.socket(socket.AF_UNIX) >>> s.bind(b'\x00hello') >>> s.getsockname() '\x00hello' That's why it returns bytes. ---------- nosy: +neologix _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17683> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com