Mercurial > hg > mercurial-source
changeset 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 | edcb56991afe |
children | a3d7f99c23c0 |
files | mercurial/hgweb/hgweb_mod.py mercurial/hgweb/hgwebdir_mod.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -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):