# HG changeset patch # User Mads Kiilerich # Date 2019-01-07 00:00:22 # Node ID 7268209e884374f9d8db85247e5055b5dbb3cb87 # Parent cad3185863e0a0a556f6b877fceecaa888ed2f2f middleware: drop special handling of hg RepoError The 'not found' case should never happen - we check that repo exists before calling out to hg. And the Mercurial RepoError handling was muting if *not* 'not found'. That seems very harmful - better to get a clear error. We are thus better without the special handling of RepoError. diff --git a/kallithea/lib/middleware/simplehg.py b/kallithea/lib/middleware/simplehg.py --- a/kallithea/lib/middleware/simplehg.py +++ b/kallithea/lib/middleware/simplehg.py @@ -151,9 +151,6 @@ class SimpleHg(BaseVCSController): environ['REPO_NAME'] = str_repo_name # used by hgweb_mod.hgweb app = self.__make_app(repo_path, baseui) return app(environ, start_response) - except RepoError as e: - if str(e).find('not found') != -1: - return HTTPNotFound()(environ, start_response) except Exception: log.error(traceback.format_exc()) return HTTPInternalServerError()(environ, start_response)