changeset 11305:d4cafcb63f77

cleanups: undefined variables
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Tue, 08 Jun 2010 09:30:45 +0200
parents 8c377f2feee1
children 7f72031d4047
files mercurial/dispatch.py mercurial/parser.py mercurial/templater.py
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Tue Jun 08 09:30:33 2010 +0200
+++ b/mercurial/dispatch.py	Tue Jun 08 09:30:45 2010 +0200
@@ -29,7 +29,7 @@
             sys.stderr.write(_("hg: parse error at %s: %s\n") %
                              (inst.args[1], inst.args[0]))
         else:
-            sys.stderr.write(_("hg: parse error: %s\n") % ints.args[0])
+            sys.stderr.write(_("hg: parse error: %s\n") % inst.args[0])
         return -1
     return _runcatch(u, args)
 
--- a/mercurial/parser.py	Tue Jun 08 09:30:33 2010 +0200
+++ b/mercurial/parser.py	Tue Jun 08 09:30:45 2010 +0200
@@ -33,8 +33,8 @@
     def _match(self, m):
         'make sure the tokenizer matches an end condition'
         if self.current[0] != m:
-            raise error.ParseError("unexpected token: %s" % self.current[2],
-                                   pos)
+            raise error.ParseError("unexpected token: %s" % self.current[0],
+                                   self.current[2])
         self._advance()
     def _parse(self, bind=0):
         token, value, pos = self._advance()
--- a/mercurial/templater.py	Tue Jun 08 09:30:33 2010 +0200
+++ b/mercurial/templater.py	Tue Jun 08 09:30:45 2010 +0200
@@ -17,7 +17,7 @@
     if isinstance(thing, str):
         yield thing
     elif not hasattr(thing, '__iter__'):
-        if i is not None:
+        if thing is not None:
             yield str(thing)
     else:
         for i in thing: