##// END OF EJS Templates
hgweb: do not use unassigned variables in exception handling
Benoit Boissinot -
r6853:2ff0829b default
parent child Browse files
Show More
@@ -53,12 +53,11 b' def rawfile(web, req, tmpl):'
53
53
54 def file(web, req, tmpl):
54 def file(web, req, tmpl):
55 path = web.cleanpath(req.form.get('file', [''])[0])
55 path = web.cleanpath(req.form.get('file', [''])[0])
56 if path:
56 if not path:
57 return web.manifest(tmpl, web.changectx(req), path)
57 try:
58 try:
58 return web.filerevision(tmpl, web.filectx(req))
59 return web.filerevision(tmpl, web.filectx(req))
59 except revlog.LookupError, inst:
60 except revlog.LookupError, inst:
60 pass
61
62 try:
61 try:
63 return web.manifest(tmpl, web.changectx(req), path)
62 return web.manifest(tmpl, web.changectx(req), path)
64 except ErrorResponse:
63 except ErrorResponse:
General Comments 0
You need to be logged in to leave comments. Login now