From 612df8e21ded5a6d7c0f6641f16422883c61b4d9 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Fri, 18 Feb 2005 11:54:46 +0000 Subject: Handle errors in imports of thread, threading --- Lib/logging/config.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Lib/logging/config.py b/Lib/logging/config.py index 92f2af0..a5c780f 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 -- cgit v0.12