##// END OF EJS Templates
repo-summary: protect against wrong commits in repo summary.
marcink -
r2148:de03feb2 default
parent child Browse files
Show More
@@ -34,7 +34,8 b' from rhodecode.lib.auth import LoginRequ'
34 34 from rhodecode.lib.markup_renderer import MarkupRenderer, relative_links
35 35 from rhodecode.lib.ext_json import json
36 36 from rhodecode.lib.vcs.backends.base import EmptyCommit
37 from rhodecode.lib.vcs.exceptions import CommitError, EmptyRepositoryError
37 from rhodecode.lib.vcs.exceptions import CommitError, EmptyRepositoryError, \
38 CommitDoesNotExistError
38 39 from rhodecode.model.db import Statistics, CacheKey, User
39 40 from rhodecode.model.meta import Session
40 41 from rhodecode.model.repo import ReadmeFinder
@@ -272,7 +273,7 b' class RepoSummaryView(RepoAppView):'
272 273 code_stats[ext]['count'] += 1
273 274 else:
274 275 code_stats[ext] = {"count": 1, "desc": ext_info}
275 except EmptyRepositoryError:
276 except (EmptyRepositoryError, CommitDoesNotExistError):
276 277 pass
277 278 return {'size': h.format_byte_size_binary(size),
278 279 'code_stats': code_stats}
General Comments 0
You need to be logged in to leave comments. Login now