SVN: r20973 - trunk/quixote

Andrew Kuchling <akuchlin-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Wed, 05 Mar 2003 14:48:34 -0500
Newsgroups gmane.comp.web.quixote.cvs
Message-ID <[email protected]>
Author: akuchlin
Date: 2003-03-05 14:48:33 -0500 (Wed, 05 Mar 2003)
New Revision: 20973

Modified:
   trunk/quixote/util.py
Log:
Move import of email inside CGIScript class; it won't work with 2.1, but at least 2.1 users can import the module

Modified: trunk/quixote/util.py
==============================================================================
--- trunk/quixote/util.py	(original)
+++ trunk/quixote/util.py	2003-03-05 14:48:34.000000000 -0500
@@ -19,7 +19,7 @@
 __revision__ = "$Id$"
 
 import sys, xmlrpclib
-import os, mimetypes, cgi, email, urllib
+import os, mimetypes, cgi, urllib
 from quixote import errors, html
 from cStringIO import StringIO
 
@@ -76,7 +76,7 @@
         'mime_type' specifies the MIME type; if omitted, the MIME
         type will be guessed, defaulting to text/plain.
         """
-        
+
         # Check that the supplied path is absolute and (if a symbolic link) may
         # be followed 
         self.path = path
@@ -241,6 +241,7 @@
         self.cache = None
 
     def __call__(self, request):
+        import email
 
         # If the compiled script is cached, get it from there. Otherwise
         # read the script file and compile it; if caching is being used,