diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 1cba64fd554100..ad7a75e0a05383 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -583,7 +583,7 @@ def makeSocket(self, timeout=1): A factory method which allows subclasses to define the precise type of socket they want. """ - if self.port is not None: + if isinstance(self.address, tuple): result = socket.create_connection(self.address, timeout=timeout) else: result = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)