[Python-checkins] python/dist/src/Lib/logging config.py,1.3,1.4

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Fri, 15 Nov 2002 15:33:22 -0800


Update of /cvsroot/python/python/dist/src/Lib/logging
In directory usw-pr-cvs1:/tmp/cvs-serv17213/Lib/logging

Modified Files:
	config.py 
Log Message:
SF Patch #638825

Fix pychecker warnings, port arg was unused (it was always the default)
Need a global statement for _listener


Index: config.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/logging/config.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** config.py	14 Nov 2002 12:52:17 -0000	1.3
--- config.py	15 Nov 2002 23:33:20 -0000	1.4
***************
*** 252,256 ****
  
          def __init__(self, host='localhost', port=DEFAULT_LOGGING_CONFIG_PORT,
!                 handler=None):
              ThreadingTCPServer.__init__(self, (host, port), handler)
              logging._acquireLock()
--- 252,256 ----
  
          def __init__(self, host='localhost', port=DEFAULT_LOGGING_CONFIG_PORT,
!                      handler=None):
              ThreadingTCPServer.__init__(self, (host, port), handler)
              logging._acquireLock()
***************
*** 272,277 ****
                  logging._releaseLock()
  
!     def serve(rcvr, hdlr):
!         server = rcvr(handler=hdlr)
          global _listener
          logging._acquireLock()
--- 272,277 ----
                  logging._releaseLock()
  
!     def serve(rcvr, hdlr, port):
!         server = rcvr(port=port, handler=hdlr)
          global _listener
          logging._acquireLock()
***************
*** 280,284 ****
          server.serve_until_stopped()
  
!     return threading.Thread(target=serve, args=(ConfigSocketReceiver, ConfigStreamHandler))
  
  def stopListening():
--- 280,286 ----
          server.serve_until_stopped()
  
!     return threading.Thread(target=serve,
!                             args=(ConfigSocketReceiver,
!                                   ConfigStreamHandler, port))
  
  def stopListening():
***************
*** 286,289 ****
--- 288,292 ----
      Stop the listening server which was created with a call to listen().
      """
+     global _listener
      if _listener:
          logging._acquireLock()