# HG changeset patch # User Dirkjan Ochtman # Date 1200990531 -3600 # Node ID c6274913eba5fa06ab25e2d5a86fb8e125b0c12e # Parent b8009718a2114e03e81b654ebd2868f24478624e hgweb: use ErrorResponse instead of custom response diff -r b8009718a211 -r c6274913eba5 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Tue Jan 22 09:11:11 2008 +0100 +++ b/mercurial/hgweb/webcommands.py Tue Jan 22 09:28:51 2008 +0100 @@ -7,7 +7,7 @@ import os, mimetypes from mercurial import revlog, util -from common import staticfile +from common import staticfile, ErrorResponse def log(web, req, tmpl): if 'file' in req.form and req.form['file'][0]: @@ -100,8 +100,7 @@ web.archive(tmpl, req, req.form['node'][0], type_) return - req.respond(400, tmpl('error', - error='Unsupported archive type: %s' % type_)) + raise ErrorResponse(400, 'Unsupported archive type: %s' % type_) def static(web, req, tmpl): fname = req.form['file'][0]