Issue 642974: logging SysLogHandler proto type wrong (original) (raw)
The (new) logging module's handlers.SysLogHandler has an incorrect protocol type when the address is a file-like object. It fails during connect as a result. A patch is as follows:
--- handlers.py 13 Nov 2002 16🔞29 -0000 1.2 +++ handlers.py 24 Nov 2002 05:36:51 -0000 @@ -348,7 +348,7 @@ self.address = address self.facility = facility if type(address) == types.StringType:
self.socket =
socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
self.socket =
socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) self.socket.connect(address) self.unixsocket = 1 else: