Mercurial > public > src > rhodecode
changeset 2428:405b1170f577 beta
fixed readme rendering bug.
when there existed a directory named like dicovery file for readme, it crashed trying to read it's content. We just skip them now
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 22 May 2012 20:23:30 +0200 |
parents | 18d34a56a736 |
children | 69b836e383df |
files | rhodecode/controllers/summary.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/summary.py Tue May 22 20:12:58 2012 +0200 +++ b/rhodecode/controllers/summary.py Tue May 22 20:23:30 2012 +0200 @@ -51,6 +51,7 @@ from rhodecode.lib.celerylib.tasks import get_commits_stats from rhodecode.lib.helpers import RepoPage from rhodecode.lib.compat import json, OrderedDict +from rhodecode.lib.vcs.nodes import FileNode log = logging.getLogger(__name__) @@ -197,6 +198,8 @@ for f in README_FILES: try: readme = cs.get_node(f) + if not isinstance(readme, FileNode): + continue readme_file = f readme_data = renderer.render(readme.content, f) log.debug('Found readme %s' % readme_file)