Handle errors in imports of thread, threading

This commit is contained in:
Vinay Sajip 2005-02-18 11:54:46 +00:00
parent 829dc51a05
commit 612df8e21d

View 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