D962: hgweb: in protocol adapter, avoid control reaching end of non-void function

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Oct 5 21:31:52 UTC 2017


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This greatly confounded some Python 3 porting work, once it was
  managing to get this far.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D962

AFFECTED FILES
  mercurial/hgweb/protocol.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py
--- a/mercurial/hgweb/protocol.py
+++ b/mercurial/hgweb/protocol.py
@@ -15,6 +15,7 @@
 )
 
 from .. import (
+    error,
     util,
     wireproto,
 )
@@ -199,3 +200,4 @@
         rsp = rsp.message
         req.respond(HTTP_OK, HGERRTYPE, body=rsp)
         return []
+    raise error.ProgrammingError('hgweb.protocol internal failure', rsp)



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list