# HG changeset patch # User Benoit Boissinot # Date 1158594211 -7200 # Node ID cff3c58a576689ad0d7a5a76829f98d9d97515b5 # Parent 2e043c9a38a6357d8cb719944c6e62e2c01d02b7 fix warnings spotted by pychecker diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -825,7 +825,6 @@ class hgweb(object): req.write(resp) def do_between(self, req): - nodes = [] if req.form.has_key('pairs'): pairs = [map(bin, p.split("-")) for p in req.form['pairs'][0].split(" ")] diff --git a/mercurial/httprepo.py b/mercurial/httprepo.py --- a/mercurial/httprepo.py +++ b/mercurial/httprepo.py @@ -131,7 +131,7 @@ class httprepository(remoterepository): self.ui = ui proxyurl = ui.config("http_proxy", "host") or os.getenv('http_proxy') - proxyauthinfo = None + # XXX proxyauthinfo = None handler = httphandler() if proxyurl: @@ -288,14 +288,13 @@ class httprepository(remoterepository): def changegroup(self, nodes, kind): n = " ".join(map(hex, nodes)) f = self.do_cmd("changegroup", roots=n) - bytes = 0 def zgenerator(f): zd = zlib.decompressobj() try: for chnk in f: yield zd.decompress(chnk) - except httplib.HTTPException, inst: + except httplib.HTTPException: raise IOError(None, _('connection ended unexpectedly')) yield zd.flush() diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -116,7 +116,6 @@ class lazyparser(object): which takes much less time. """ if self.allmap: return - start = 0 end = self.datasize self.allmap = 1 cur = 0 diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -615,7 +615,8 @@ else: try: rcs.extend([os.path.join(rcdir, f) for f in os.listdir(rcdir) if f.endswith(".rc")]) - except OSError, inst: pass + except OSError: + pass return rcs def os_rcpath():