diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2005-03-31 20:11:45 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2005-03-31 20:11:45 (GMT) |
commit | 2d6fe25689ea79802cd9657b4a686362f4ed7e89 (patch) | |
tree | 310582c247ebbabdd3bc7e5768d58584c11558a3 /Lib | |
parent | d7937f0b4310b41c5a82fe0ca5987262e0e9d924 (diff) | |
download | cpython-2d6fe25689ea79802cd9657b4a686362f4ed7e89.zip cpython-2d6fe25689ea79802cd9657b4a686362f4ed7e89.tar.gz cpython-2d6fe25689ea79802cd9657b4a686362f4ed7e89.tar.bz2 |
Minor changes to imports
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/logging/config.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py index 92f2af0..ea157db 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -1,4 +1,4 @@ -# Copyright 2001-2004 by Vinay Sajip. All Rights Reserved. +# Copyright 2001-2005 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, @@ -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, traceback + +try: + import thread + import threading +except ImportError: + thread = None from SocketServer import ThreadingTCPServer, StreamRequestHandler @@ -189,7 +195,6 @@ def fileConfig(fname, defaults=None): for log in existing: root.manager.loggerDict[log].disabled = 1 except: - import traceback ei = sys.exc_info() traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr) del ei |