##// END OF EJS Templates
summary: Improve logging around README handling
johbo -
r767:5902f223 default
parent child Browse files
Show More
@@ -84,12 +84,12 b' class SummaryController(BaseRepoControll'
84 filename=f)
84 filename=f)
85 break
85 break
86 except CommitError:
86 except CommitError:
87 log.exception("Problem getting commit")
87 log.exception(
88 pass
88 "Problem getting commit when trying to render the README.")
89 except EmptyRepositoryError:
89 except EmptyRepositoryError:
90 pass
90 log.debug("Repository is empty, no README to render.")
91 except Exception:
91 except Exception:
92 log.exception("General failure")
92 log.exception("Exception while trying to render the README")
93
93
94 return readme_data, readme_file
94 return readme_data, readme_file
95
95
@@ -102,11 +102,13 b' class SummaryController(BaseRepoControll'
102
102
103 return computed
103 return computed
104
104
105
106 @LoginRequired()
105 @LoginRequired()
107 @HasRepoPermissionAnyDecorator(
106 @HasRepoPermissionAnyDecorator(
108 'repository.read', 'repository.write', 'repository.admin')
107 'repository.read', 'repository.write', 'repository.admin')
109 def index(self, repo_name):
108 def index(self, repo_name):
109
110 # Prepare the clone URL
111
110 username = ''
112 username = ''
111 if c.rhodecode_user.username != User.DEFAULT_USER:
113 if c.rhodecode_user.username != User.DEFAULT_USER:
112 username = safe_str(c.rhodecode_user.username)
114 username = safe_str(c.rhodecode_user.username)
@@ -124,6 +126,8 b' class SummaryController(BaseRepoControll'
124 c.clone_repo_url_id = c.rhodecode_db_repo.clone_url(
126 c.clone_repo_url_id = c.rhodecode_db_repo.clone_url(
125 user=username, uri_tmpl=_def_clone_uri_by_id)
127 user=username, uri_tmpl=_def_clone_uri_by_id)
126
128
129 # If enabled, get statistics data
130
127 c.show_stats = bool(c.rhodecode_db_repo.enable_statistics)
131 c.show_stats = bool(c.rhodecode_db_repo.enable_statistics)
128
132
129 stats = self.sa.query(Statistics)\
133 stats = self.sa.query(Statistics)\
General Comments 0
You need to be logged in to leave comments. Login now