Mercurial > kallithea
changeset 7706:7268209e8843
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.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 07 Jan 2019 00:00:22 +0100 |
parents | cad3185863e0 |
children | 0e5926e84b3b |
files | kallithea/lib/middleware/simplehg.py |
diffstat | 1 files changed, 0 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/middleware/simplehg.py Sun Jan 06 21:45:34 2019 +0100 +++ b/kallithea/lib/middleware/simplehg.py Mon Jan 07 00:00:22 2019 +0100 @@ -151,9 +151,6 @@ 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)