byterange: fix import error
authorMartin Geisler <mg@lazybytes.net>
Thu, 14 May 2009 13:20:04 +0200
changeset 8378 59acf64995d2
parent 8377 29f4f0d66cd5
child 8379 10fd7fb65110
byterange: fix import error We must import the module as email.Utils on case-sensitive filesystems.
mercurial/byterange.py
--- a/mercurial/byterange.py	Wed May 13 15:03:31 2009 -0400
+++ b/mercurial/byterange.py	Thu May 14 13:20:04 2009 +0200
@@ -23,7 +23,7 @@
 import stat
 import urllib
 import urllib2
-import email.utils
+import email.Utils
 
 try:
     from cStringIO import StringIO
@@ -214,7 +214,7 @@
         localfile = urllib.url2pathname(file)
         stats = os.stat(localfile)
         size = stats[stat.ST_SIZE]
-        modified = email.utils.formatdate(stats[stat.ST_MTIME])
+        modified = email.Utils.formatdate(stats[stat.ST_MTIME])
         mtype = mimetypes.guess_type(file)[0]
         if host:
             host, port = urllib.splitport(host)