summaryrefslogtreecommitdiff
path: root/Lib/logging/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/logging/config.py')
-rw-r--r--Lib/logging/config.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 4f55c53ead..07b9d1a834 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -873,6 +873,8 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT):
def run(self):
server = self.rcvr(port=self.port, handler=self.hdlr,
ready=self.ready)
+ if self.port == 0:
+ self.port = server.server_address[1]
self.ready.set()
global _listener
logging._acquireLock()