# HG changeset patch # User Marcin Kuzminski # Date 2017-10-06 13:02:25 # Node ID de03feb20f1d6c2aa6fc71db847d5ad456487e8c # Parent d5d925851f7e71dcc6a36841dfa118e8204fa6db repo-summary: protect against wrong commits in repo summary. diff --git a/rhodecode/apps/repository/views/repo_summary.py b/rhodecode/apps/repository/views/repo_summary.py --- a/rhodecode/apps/repository/views/repo_summary.py +++ b/rhodecode/apps/repository/views/repo_summary.py @@ -34,7 +34,8 @@ from rhodecode.lib.auth import LoginRequ from rhodecode.lib.markup_renderer import MarkupRenderer, relative_links from rhodecode.lib.ext_json import json from rhodecode.lib.vcs.backends.base import EmptyCommit -from rhodecode.lib.vcs.exceptions import CommitError, EmptyRepositoryError +from rhodecode.lib.vcs.exceptions import CommitError, EmptyRepositoryError, \ + CommitDoesNotExistError from rhodecode.model.db import Statistics, CacheKey, User from rhodecode.model.meta import Session from rhodecode.model.repo import ReadmeFinder @@ -272,7 +273,7 @@ class RepoSummaryView(RepoAppView): code_stats[ext]['count'] += 1 else: code_stats[ext] = {"count": 1, "desc": ext_info} - except EmptyRepositoryError: + except (EmptyRepositoryError, CommitDoesNotExistError): pass return {'size': h.format_byte_size_binary(size), 'code_stats': code_stats}