##// END OF EJS Templates
cleanups: undefined variables
Dirkjan Ochtman -
r11305:d4cafcb6 default
parent child Browse files
Show More
@@ -29,7 +29,7 b' def dispatch(args):'
29 sys.stderr.write(_("hg: parse error at %s: %s\n") %
29 sys.stderr.write(_("hg: parse error at %s: %s\n") %
30 (inst.args[1], inst.args[0]))
30 (inst.args[1], inst.args[0]))
31 else:
31 else:
32 sys.stderr.write(_("hg: parse error: %s\n") % ints.args[0])
32 sys.stderr.write(_("hg: parse error: %s\n") % inst.args[0])
33 return -1
33 return -1
34 return _runcatch(u, args)
34 return _runcatch(u, args)
35
35
@@ -33,8 +33,8 b' class parser(object):'
33 def _match(self, m):
33 def _match(self, m):
34 'make sure the tokenizer matches an end condition'
34 'make sure the tokenizer matches an end condition'
35 if self.current[0] != m:
35 if self.current[0] != m:
36 raise error.ParseError("unexpected token: %s" % self.current[2],
36 raise error.ParseError("unexpected token: %s" % self.current[0],
37 pos)
37 self.current[2])
38 self._advance()
38 self._advance()
39 def _parse(self, bind=0):
39 def _parse(self, bind=0):
40 token, value, pos = self._advance()
40 token, value, pos = self._advance()
@@ -17,7 +17,7 b' def _flatten(thing):'
17 if isinstance(thing, str):
17 if isinstance(thing, str):
18 yield thing
18 yield thing
19 elif not hasattr(thing, '__iter__'):
19 elif not hasattr(thing, '__iter__'):
20 if i is not None:
20 if thing is not None:
21 yield str(thing)
21 yield str(thing)
22 else:
22 else:
23 for i in thing:
23 for i in thing:
General Comments 0
You need to be logged in to leave comments. Login now