diff -r e1cdf5f6386e -r 3f2e334937ce mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Sun Mar 18 20:39:25 2007 +0100 +++ b/mercurial/hgweb/hgweb_mod.py Mon Mar 19 19:07:35 2007 -0300 @@ -806,19 +806,22 @@ "sessionvars": sessionvars }) - if not req.form.has_key('cmd'): - req.form['cmd'] = [self.t.cache['default']] + try: + if not req.form.has_key('cmd'): + req.form['cmd'] = [self.t.cache['default']] - cmd = req.form['cmd'][0] + cmd = req.form['cmd'][0] - method = getattr(self, 'do_' + cmd, None) - if method: - try: - method(req) - except (hg.RepoError, revlog.RevlogError), inst: - req.write(self.t("error", error=str(inst))) - else: - req.write(self.t("error", error='No such method: ' + cmd)) + method = getattr(self, 'do_' + cmd, None) + if method: + try: + method(req) + except (hg.RepoError, revlog.RevlogError), inst: + req.write(self.t("error", error=str(inst))) + else: + req.write(self.t("error", error='No such method: ' + cmd)) + finally: + self.t = None def changectx(self, req): if req.form.has_key('node'):