From: Vinay Sajip Date: Fri, 18 Feb 2005 11:54:46 +0000 (+0000) Subject: Handle errors in imports of thread, threading X-Git-Tag: v2.5a0~2013 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=612df8e21ded5a6d7c0f6641f16422883c61b4d9;p=thirdparty%2FPython%2Fcpython.git Handle errors in imports of thread, threading --- diff --git a/Lib/logging/config.py b/Lib/logging/config.py index 92f2af0abb81..a5c780fe5d94 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -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