]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Handle errors in imports of thread, threading
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Fri, 18 Feb 2005 11:54:46 +0000 (11:54 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Fri, 18 Feb 2005 11:54:46 +0000 (11:54 +0000)
Lib/logging/config.py

index 92f2af0abb81954c6b9a2f15f3ad5c4dc8169c6f..a5c780fe5d9494bccd9e13c77695103f6305d097 100644 (file)
@@ -27,7 +27,13 @@ Copyright (C) 2001-2004 Vinay Sajip. All Rights Reserved.
 To use, simply 'import logging' and log away!
 """
 
-import sys, logging, logging.handlers, string, thread, threading, socket, struct, os
+import sys, logging, logging.handlers, string, socket, struct, os
+
+try:
+    import thread
+    import threading
+except ImportError:
+    thread = None
 
 from SocketServer import ThreadingTCPServer, StreamRequestHandler