Mercurial > kallithea
changeset 8283:5b8678cf4e00
utils: don't raise NotImplementedError in is_valid_repo_uri when the user provides an "invalid" URL
We prefer to reserve NotImplementedError for programming errors that allow
access to unsupported corner cases in code.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 06 Mar 2020 19:02:26 +0100 |
parents | 352056907cfd |
children | b595758f0792 |
files | kallithea/lib/utils.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/utils.py Sun Mar 01 21:40:32 2020 +0100 +++ b/kallithea/lib/utils.py Fri Mar 06 19:02:26 2020 +0100 @@ -240,7 +240,7 @@ 'The "hgsubversion" library is missing')) svnremoterepo(ui, url).svn.uuid elif url.startswith('git+http'): - raise NotImplementedError() + raise InvalidCloneUriException('URI type %s not implemented' % (url,)) else: raise InvalidCloneUriException('URI %s not allowed' % (url,)) @@ -250,9 +250,9 @@ # or does it pass basic auth GitRepository._check_url(url) elif url.startswith('svn+http'): - raise NotImplementedError() + raise InvalidCloneUriException('URI type %s not implemented' % (url,)) elif url.startswith('hg+http'): - raise NotImplementedError() + raise InvalidCloneUriException('URI type %s not implemented' % (url,)) else: raise InvalidCloneUriException('URI %s not allowed' % (url))