Changeset - 0bac887ea148
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2015-04-13 15:58:56
madski@unity3d.com
changeset: don't crash with unhandled EmptyRepositoryError when visiting (non-existing) changeset in an empty repo
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changeset.py
Show inline comments
 
@@ -36,7 +36,7 @@ from webob.exc import HTTPFound, HTTPFor
 

	
 
from kallithea.lib.utils import jsonify
 
from kallithea.lib.vcs.exceptions import RepositoryError, \
 
    ChangesetDoesNotExistError
 
    ChangesetDoesNotExistError, EmptyRepositoryError
 

	
 
from kallithea.lib.compat import json
 
import kallithea.lib.helpers as h
 
@@ -228,7 +228,7 @@ class ChangesetController(BaseRepoContro
 
            if not c.cs_ranges:
 
                raise RepositoryError('Changeset range returned empty result')
 

	
 
        except ChangesetDoesNotExistError:
 
        except (ChangesetDoesNotExistError, EmptyRepositoryError):
 
            log.debug(traceback.format_exc())
 
            msg = _('Such revision does not exist for this repository')
 
            h.flash(msg, category='error')
0 comments (0 inline, 0 general)