##// END OF EJS Templates
A number of minor fixes to problems that pychecker found....
mark.williamson@cl.cam.ac.uk -
r667:31a9aa89 default
parent child Browse files
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 os, getopt
1 import getopt
2 2
3 3 def fancyopts(args, options, state):
4 4 long=[]
@@ -764,7 +764,7 class localrepository:
764 764 mf1[f] = util.is_exec(self.wjoin(f), mf1.get(f, False))
765 765 t = self.wfile(f).read()
766 766 except IOError:
767 self.warn("trouble committing %s!\n" % f)
767 self.ui.warn("trouble committing %s!\n" % f)
768 768 raise
769 769
770 770 meta = {}
@@ -25,7 +25,7 def explain_exit(code):
25 25 val = os.WTERMSIG(code)
26 26 return "killed by signal %d" % val, val
27 27 elif os.WIFSTOPPED(code):
28 val = os.STOPSIG(code)
28 val = os.WSTOPSIG(code)
29 29 return "stopped by signal %d" % val, val
30 30 raise ValueError("invalid exit code")
31 31
General Comments 0
You need to be logged in to leave comments. Login now