Merge pull request #1547 from guj-zz/syslog_socktype

parse_syslog_addr sock_type default
This commit is contained in:
Randall Leeds 2017-08-06 23:37:55 -07:00 committed by GitHub
commit fc0d973416

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]