summary: Improve logging around README handling
This commit is contained in:
parent
b61fe09156
commit
76193ccd7d
1 changed files with 9 additions and 5 deletions
|
|
@ -84,12 +84,12 @@ class SummaryController(BaseRepoController):
|
|||
filename=f)
|
||||
break
|
||||
except CommitError:
|
||||
log.exception("Problem getting commit")
|
||||
pass
|
||||
log.exception(
|
||||
"Problem getting commit when trying to render the README.")
|
||||
except EmptyRepositoryError:
|
||||
pass
|
||||
log.debug("Repository is empty, no README to render.")
|
||||
except Exception:
|
||||
log.exception("General failure")
|
||||
log.exception("Exception while trying to render the README")
|
||||
|
||||
return readme_data, readme_file
|
||||
|
||||
|
|
@ -102,11 +102,13 @@ class SummaryController(BaseRepoController):
|
|||
|
||||
return computed
|
||||
|
||||
|
||||
@LoginRequired()
|
||||
@HasRepoPermissionAnyDecorator(
|
||||
'repository.read', 'repository.write', 'repository.admin')
|
||||
def index(self, repo_name):
|
||||
|
||||
# Prepare the clone URL
|
||||
|
||||
username = ''
|
||||
if c.rhodecode_user.username != User.DEFAULT_USER:
|
||||
username = safe_str(c.rhodecode_user.username)
|
||||
|
|
@ -124,6 +126,8 @@ class SummaryController(BaseRepoController):
|
|||
c.clone_repo_url_id = c.rhodecode_db_repo.clone_url(
|
||||
user=username, uri_tmpl=_def_clone_uri_by_id)
|
||||
|
||||
# If enabled, get statistics data
|
||||
|
||||
c.show_stats = bool(c.rhodecode_db_repo.enable_statistics)
|
||||
|
||||
stats = self.sa.query(Statistics)\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue