hgweb: move call to protocol handler outside of try..except
The protocol handler doesn't raise ErrorResponse. So it doesn't
need to be in this `try..except ErrorResponse` block.
Differential Revision: https://phab.mercurial-scm.org/D2020
--- a/mercurial/hgweb/hgweb_mod.py Wed Jan 31 16:21:43 2018 -0800
+++ b/mercurial/hgweb/hgweb_mod.py Wed Jan 31 16:43:46 2018 -0800
@@ -368,7 +368,6 @@
raise ErrorResponse(HTTP_NOT_FOUND)
if cmd in perms:
self.check_perm(rctx, req, perms[cmd])
- return protohandler['dispatch']()
except ErrorResponse as inst:
# A client that sends unbundle without 100-continue will
# break if we respond early.
@@ -383,6 +382,8 @@
body='0\n%s\n' % inst)
return ''
+ return protohandler['dispatch']()
+
# translate user-visible url structure to internal structure
args = query.split('/', 2)