Changeset - 013796b2c861
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 7 years ago 2018-12-29 22:02:39
thomas.de_schampheleire@nokia.com
lib: BaseRepoController: use webob.exc.HTTPNotFound if possible

In the entire code base, the use of 'paste' is very limited.
In particular, 'paste.httpexceptions' is only still used in lib/base.py, in
three occurrences:
- two of them in class BasicAuth which derives from paste.auth.something.
Here it probably makes sense to use paste.httpexceptions.
- one in BaseRepoController, which has no specific relation to paste. This
occurrence can be replaced with webob.exc like in the rest of the code
base.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/base.py
Show inline comments
 
@@ -579,13 +579,13 @@ class BaseRepoController(BaseController)
 
            if c.db_repo_scm_instance is None:
 
                log.error('%s this repository is present in database but it '
 
                          'cannot be created as an scm instance', c.repo_name)
 
                from kallithea.lib import helpers as h
 
                h.flash(h.literal(_('Repository not found in the filesystem')),
 
                        category='error')
 
                raise paste.httpexceptions.HTTPNotFound()
 
                raise webob.exc.HTTPNotFound()
 

	
 
            # some globals counter for menu
 
            c.repository_followers = self.scm_model.get_followers(dbr)
 
            c.repository_forks = self.scm_model.get_forks(dbr)
 
            c.repository_pull_requests = self.scm_model.get_pull_requests(dbr)
 
            c.repository_following = self.scm_model.is_following_repo(
0 comments (0 inline, 0 general)