diff options
-rw-r--r-- | src/lib/Logging.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Logging.py b/src/lib/Logging.py index 0b59e8d25..3d77bdb97 100644 --- a/src/lib/Logging.py +++ b/src/lib/Logging.py @@ -114,7 +114,10 @@ class FragmentingSysLogHandler(logging.handlers.SysLogHandler): except socket.error: while True: try: - self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) + if isinstance(self.address, types.TupleType): + self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + else: + self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) self.socket.connect(self.address) break except socket.error: |