Changeset - 67168195a676
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-10-19 10:13:10
marcin@python-works.com
Catch all exception on get_current_revision
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/__init__.py
Show inline comments
 
@@ -394,13 +394,12 @@ def get_current_revision(quiet=False):
 
    try:
 
        from vcs import get_repo
 
        from vcs.utils.helpers import get_scm
 
        from vcs.exceptions import RepositoryError, VCSError
 
        repopath = os.path.join(os.path.dirname(__file__), '..', '..')
 
        scm = get_scm(repopath)[0]
 
        repo = get_repo(path=repopath, alias=scm)
 
        tip = repo.get_changeset()
 
        return (tip.revision, tip.short_id)
 
    except (ImportError, RepositoryError, VCSError), err:
 
    except Exception, err:
 
        if not quiet:
 
            print ("Cannot retrieve rhodecode's revision. Original error "
 
                   "was: %s" % err)
0 comments (0 inline, 0 general)