]> code.delx.au - offlineimap/blobdiff - offlineimap/threadutil.py
Workaround for bug in Exchange
[offlineimap] / offlineimap / threadutil.py
index 87b8973aa7d1ac707707660eb5450367e7356d9f..1818cf87db0ba9e9dbb747a09ae03e2b51013960 100644 (file)
@@ -18,7 +18,7 @@
 
 from threading import *
 from StringIO import StringIO
-import sys, traceback, thread, profile
+import sys, traceback, thread
 from offlineimap.ui import UIBase       # for getglobalui()
 
 profiledir = None
@@ -152,6 +152,7 @@ class ExitNotifyThread(Thread):
             if not profiledir:          # normal case
                 Thread.run(self)
             else:
+                import profile
                 prof = profile.Profile()
                 try:
                     prof = prof.runctx("Thread.run(self)", globals(), locals())