parse_syslog_address: unix domain socket type default None, since SOCK_STREAM may not be appropriate

This commit is contained in:
zz 2017-06-19 13:03:11 +02:00
parent 5426b04a7a
commit af92742143

View File

@ -119,10 +119,12 @@ class SafeAtoms(dict):
def parse_syslog_address(addr):
# unix domain socket type depends on backend
# SysLogHandler will try both when given None
if addr.startswith("unix://"):
sock_type = socket.SOCK_STREAM
sock_type = None
# are we using a different socket type?
# set socket type only if explicitly requested
parts = addr.split("#", 1)
if len(parts) == 2:
addr = parts[0]