Mercurial > hg
diff mercurial/byterange.py @ 8366:0bf0045000b5
some modernization cleanups, forward compatibility
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Wed, 13 May 2009 14:08:39 +0200 |
parents | 8fee8ff13d37 |
children | 59acf64995d2 |
line wrap: on
line diff
--- a/mercurial/byterange.py Tue May 12 10:03:36 2009 -0400 +++ b/mercurial/byterange.py Wed May 13 14:08:39 2009 +0200 @@ -23,7 +23,7 @@ import stat import urllib import urllib2 -import rfc822 +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 = rfc822.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)