Use new email module names (#1637162, #1637159, #1637157).

This commit is contained in:
Georg Brandl 2007-01-22 19:40:21 +00:00
parent dd7b0525e9
commit 5a096e1b10
6 changed files with 28 additions and 28 deletions

View file

@ -452,7 +452,7 @@ class URLopener:
def open_local_file(self, url):
"""Use local file."""
import mimetypes, mimetools, email.Utils
import mimetypes, mimetools, email.utils
try:
from cStringIO import StringIO
except ImportError:
@ -464,7 +464,7 @@ class URLopener:
except OSError, e:
raise IOError(e.errno, e.strerror, e.filename)
size = stats.st_size
modified = email.Utils.formatdate(stats.st_mtime, usegmt=True)
modified = email.utils.formatdate(stats.st_mtime, usegmt=True)
mtype = mimetypes.guess_type(url)[0]
headers = mimetools.Message(StringIO(
'Content-Type: %s\nContent-Length: %d\nLast-modified: %s\n' %