##// END OF EJS Templates
hgweb: trap lookup errors
Brendan Cully -
r3359:41741218 default
parent child Browse files
Show More
@@ -13,7 +13,7 b' from mercurial.demandload import demandl'
13 13 demandload(globals(), "re zlib ConfigParser mimetools cStringIO sys tempfile")
14 14 demandload(globals(), 'urllib')
15 15 demandload(globals(), "mercurial:mdiff,ui,hg,util,archival,streamclone,patch")
16 demandload(globals(), "mercurial:templater")
16 demandload(globals(), "mercurial:revlog,templater")
17 17 demandload(globals(), "mercurial.hgweb.common:get_mtime,staticfile,style_map")
18 18 from mercurial.node import *
19 19 from mercurial.i18n import gettext as _
@@ -765,7 +765,10 b' class hgweb(object):'
765 765
766 766 method = getattr(self, 'do_' + cmd, None)
767 767 if method:
768 try:
768 769 method(req)
770 except (hg.RepoError, revlog.RevlogError), inst:
771 req.write(self.t("error", error=str(inst)))
769 772 else:
770 773 req.write(self.t("error", error='No such method: ' + cmd))
771 774
General Comments 0
You need to be logged in to leave comments. Login now