Show More
@@ -101,7 +101,7 b' class SummaryController(BaseRepoControll' | |||||
101 | renderer = MarkupRenderer() |
|
101 | renderer = MarkupRenderer() | |
102 | try: |
|
102 | try: | |
103 | return renderer.render( |
|
103 | return renderer.render( | |
104 |
readme_node.content, filename=readme_node. |
|
104 | readme_node.content, filename=readme_node.path) | |
105 | except Exception: |
|
105 | except Exception: | |
106 | log.exception( |
|
106 | log.exception( | |
107 | "Exception while trying to render the README") |
|
107 | "Exception while trying to render the README") |
@@ -987,7 +987,7 b' class ReadmeFinder:' | |||||
987 | matches = self._match_readmes(nodes) |
|
987 | matches = self._match_readmes(nodes) | |
988 | matches = self._sort_according_to_priority(matches) |
|
988 | matches = self._sort_according_to_priority(matches) | |
989 | if matches: |
|
989 | if matches: | |
990 | return matches[0] |
|
990 | return matches[0].node | |
991 |
|
991 | |||
992 | paths = self._match_paths(nodes) |
|
992 | paths = self._match_paths(nodes) | |
993 | paths = self._sort_paths_according_to_priority(paths) |
|
993 | paths = self._sort_paths_according_to_priority(paths) | |
@@ -1041,13 +1041,13 b' class ReadmeFinder:' | |||||
1041 | class ReadmeMatch: |
|
1041 | class ReadmeMatch: | |
1042 |
|
1042 | |||
1043 | def __init__(self, node, match, priority): |
|
1043 | def __init__(self, node, match, priority): | |
1044 |
self. |
|
1044 | self.node = node | |
1045 | self._match = match |
|
1045 | self._match = match | |
1046 | self.priority = priority |
|
1046 | self.priority = priority | |
1047 |
|
1047 | |||
1048 | @property |
|
1048 | @property | |
1049 | def path(self): |
|
1049 | def path(self): | |
1050 |
return self. |
|
1050 | return self.node.path | |
1051 |
|
1051 | |||
1052 | def __repr__(self): |
|
1052 | def __repr__(self): | |
1053 | return '<ReadmeMatch {} priority={}'.format(self.path, self.priority) |
|
1053 | return '<ReadmeMatch {} priority={}'.format(self.path, self.priority) |
General Comments 0
You need to be logged in to leave comments.
Login now