Mercurial > hg
changeset 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 | 0100a43788ca |
children | d93f0b127b6a |
files | mercurial/byterange.py mercurial/commands.py mercurial/fancyopts.py mercurial/hg.py mercurial/util.py |
diffstat | 5 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/byterange.py Sun Jul 10 16:00:56 2005 -0800 +++ b/mercurial/byterange.py Sun Jul 10 16:01:11 2005 -0800 @@ -219,7 +219,7 @@ 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 @@ import ftplib import socket import sys -import ftplib import mimetypes import mimetools @@ -275,7 +274,7 @@ 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)
--- a/mercurial/commands.py Sun Jul 10 16:00:56 2005 -0800 +++ b/mercurial/commands.py Sun Jul 10 16:01:11 2005 -0800 @@ -897,7 +897,7 @@ if not d: break fout.write(d) - out.flush() + fout.flush() elif cmd == "addchangegroup": if not lock:
--- a/mercurial/fancyopts.py Sun Jul 10 16:00:56 2005 -0800 +++ b/mercurial/fancyopts.py Sun Jul 10 16:01:11 2005 -0800 @@ -1,4 +1,4 @@ -import os, getopt +import getopt def fancyopts(args, options, state): long=[]
--- a/mercurial/hg.py Sun Jul 10 16:00:56 2005 -0800 +++ b/mercurial/hg.py Sun Jul 10 16:01:11 2005 -0800 @@ -764,7 +764,7 @@ mf1[f] = util.is_exec(self.wjoin(f), mf1.get(f, False)) t = self.wfile(f).read() except IOError: - self.warn("trouble committing %s!\n" % f) + self.ui.warn("trouble committing %s!\n" % f) raise meta = {}
--- a/mercurial/util.py Sun Jul 10 16:00:56 2005 -0800 +++ b/mercurial/util.py Sun Jul 10 16:01:11 2005 -0800 @@ -25,7 +25,7 @@ val = os.WTERMSIG(code) return "killed by signal %d" % val, val elif os.WIFSTOPPED(code): - val = os.STOPSIG(code) + val = os.WSTOPSIG(code) return "stopped by signal %d" % val, val raise ValueError("invalid exit code")