summaryrefslogtreecommitdiff
path: root/Lib/logging/config.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2010-05-03 15:11:53 +0000
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2010-05-03 15:11:53 +0000
commit27a1370ae0608d083ec1b4162d510cb7ec6a95f5 (patch)
tree96f09db1c6958ff8ab026308edb19dc6bb218f9d /Lib/logging/config.py
parentc1f5c2f3331857898595eb9bd8cf7e195d5fea5b (diff)
downloadcpython-git-27a1370ae0608d083ec1b4162d510cb7ec6a95f5.tar.gz
Issue #8576: logging updated to remove usage of find_unused_port().
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()