Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/hgweb_mod.py @ 7740:176d3d681702
hgweb: pass ErrorResponses directly into req.respond()
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 09 Feb 2009 11:29:09 +0100 |
parents | 1d54e2f6c0b7 |
children | b5ed0ab8cc74 |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Sat Feb 07 23:29:12 2009 +0100 +++ b/mercurial/hgweb/hgweb_mod.py Mon Feb 09 11:29:09 2009 +0100 @@ -99,7 +99,7 @@ method = getattr(protocol, cmd) return method(self.repo, req) except ErrorResponse, inst: - req.respond(inst.code, protocol.HGTYPE) + req.respond(inst, protocol.HGTYPE) if not inst.message: return [] return '0\n%s\n' % inst.message, @@ -194,7 +194,7 @@ req.respond(HTTP_SERVER_ERROR, ctype) return tmpl('error', error=str(inst)) except ErrorResponse, inst: - req.respond(inst.code, ctype) + req.respond(inst, ctype) return tmpl('error', error=inst.message) def templater(self, req):