Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/byterange.py @ 667:31a9aa890016
A number of minor fixes to problems that pychecker found.
# HG changeset patch
# User mark.williamson@cl.cam.ac.uk
# Node ID 55d38977b7f2e73b8c1090179928ac96c8922b90
# Parent b3bba126b04ab2f24274a1bcf5a224c6317c8e0d
A number of minor fixes to problems that pychecker found.
author | mark.williamson@cl.cam.ac.uk |
---|---|
date | Sun, 10 Jul 2005 16:01:11 -0800 |
parents | 7f5ce4bbdd7b |
children | 6513ba7d858a |
line wrap: on
line diff
--- a/mercurial/byterange.py +++ b/mercurial/byterange.py @@ -219,7 +219,7 @@ class FileRangeHandler(urllib2.FileHandl if host: host, port = urllib.splitport(host) if port or socket.gethostbyname(host) not in self.get_names(): - raise URLError('file not on local host') + raise urllib2.URLError('file not on local host') fo = open(localfile,'rb') brange = req.headers.get('Range',None) brange = range_header_to_tuple(brange) @@ -249,7 +249,6 @@ from urllib import splitport, splituser, import ftplib import socket import sys -import ftplib import mimetypes import mimetools @@ -275,7 +274,7 @@ class FTPRangeHandler(urllib2.FTPHandler try: host = socket.gethostbyname(host) except socket.error, msg: - raise URLError(msg) + raise urllib2.URLError(msg) path, attrs = splitattr(req.get_selector()) dirs = path.split('/') dirs = map(unquote, dirs)