changeset 3131:cff3c58a5766

fix warnings spotted by pychecker
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 18 Sep 2006 17:43:31 +0200
parents 2e043c9a38a6
children 81da3c45aabd
files mercurial/hgweb/hgweb_mod.py mercurial/httprepo.py mercurial/revlog.py mercurial/util.py
diffstat 4 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Mon Sep 18 17:32:28 2006 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Mon Sep 18 17:43:31 2006 +0200
@@ -825,7 +825,6 @@
         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(" ")]
--- a/mercurial/httprepo.py	Mon Sep 18 17:32:28 2006 +0200
+++ b/mercurial/httprepo.py	Mon Sep 18 17:43:31 2006 +0200
@@ -131,7 +131,7 @@
         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 @@
     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()
 
--- a/mercurial/revlog.py	Mon Sep 18 17:32:28 2006 +0200
+++ b/mercurial/revlog.py	Mon Sep 18 17:43:31 2006 +0200
@@ -116,7 +116,6 @@
         which takes much less time.
         """
         if self.allmap: return
-        start = 0
         end = self.datasize
         self.allmap = 1
         cur = 0
--- a/mercurial/util.py	Mon Sep 18 17:32:28 2006 +0200
+++ b/mercurial/util.py	Mon Sep 18 17:43:31 2006 +0200
@@ -615,7 +615,8 @@
         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():