Show More
@@ -219,7 +219,7 class FileRangeHandler(urllib2.FileHandl | |||
|
219 | 219 | if host: |
|
220 | 220 | host, port = urllib.splitport(host) |
|
221 | 221 | if port or socket.gethostbyname(host) not in self.get_names(): |
|
222 | raise URLError('file not on local host') | |
|
222 | raise urllib2.URLError('file not on local host') | |
|
223 | 223 | fo = open(localfile,'rb') |
|
224 | 224 | brange = req.headers.get('Range',None) |
|
225 | 225 | brange = range_header_to_tuple(brange) |
@@ -249,7 +249,6 from urllib import splitport, splituser, | |||
|
249 | 249 | import ftplib |
|
250 | 250 | import socket |
|
251 | 251 | import sys |
|
252 | import ftplib | |
|
253 | 252 | import mimetypes |
|
254 | 253 | import mimetools |
|
255 | 254 | |
@@ -275,7 +274,7 class FTPRangeHandler(urllib2.FTPHandler | |||
|
275 | 274 | try: |
|
276 | 275 | host = socket.gethostbyname(host) |
|
277 | 276 | except socket.error, msg: |
|
278 | raise URLError(msg) | |
|
277 | raise urllib2.URLError(msg) | |
|
279 | 278 | path, attrs = splitattr(req.get_selector()) |
|
280 | 279 | dirs = path.split('/') |
|
281 | 280 | dirs = map(unquote, dirs) |
@@ -897,7 +897,7 def serve(ui, repo, **opts): | |||
|
897 | 897 | if not d: break |
|
898 | 898 | fout.write(d) |
|
899 | 899 | |
|
900 | out.flush() | |
|
900 | fout.flush() | |
|
901 | 901 | |
|
902 | 902 | elif cmd == "addchangegroup": |
|
903 | 903 | if not lock: |
@@ -1,4 +1,4 | |||
|
1 |
import |
|
|
1 | import getopt | |
|
2 | 2 | |
|
3 | 3 | def fancyopts(args, options, state): |
|
4 | 4 | long=[] |
General Comments 0
You need to be logged in to leave comments.
Login now