fix default initial setting for accumulating notes
Start with an empty string instead of None to avoid having all output prefixed with "None". Include additional debugging info, with some commented out for local use later. Change-Id: Ie09d740ad6bf0f396a26631e2db82801c043d248 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
ad91e39786
commit
da85f18fa2
@ -400,7 +400,7 @@ class HighlightsDirective(rst.Directive):
|
||||
highlights = series_info.get('cycle-highlights')
|
||||
if highlights:
|
||||
# Add highlights to any existing notes already collected
|
||||
notes = series_highlights.get(series_info['team'])
|
||||
notes = series_highlights.get(series_info['team'], '')
|
||||
series_highlights[series_info['team']] = '{}{}\n\n'.format(
|
||||
notes, highlights)
|
||||
|
||||
@ -415,6 +415,9 @@ class HighlightsDirective(rst.Directive):
|
||||
if not series:
|
||||
raise self.error('series value must be set to a valid cycle name.')
|
||||
|
||||
app.info('[series-highlights] gathering highlights for {}'.format(
|
||||
series))
|
||||
|
||||
result = ViewList()
|
||||
series_highlights = self._get_deliverable_highlights(series)
|
||||
source_name = '<{}>'.format(__name__)
|
||||
@ -428,6 +431,9 @@ class HighlightsDirective(rst.Directive):
|
||||
result.append(series_highlights[team], source_name)
|
||||
result.append('', source_name)
|
||||
|
||||
# NOTE(dhellmann): Useful for debugging.
|
||||
# print('\n'.join(result))
|
||||
|
||||
node = nodes.section()
|
||||
node.document = self.state.document
|
||||
nested_parse_with_titles(self.state, result, node)
|
||||
|
Loading…
x
Reference in New Issue
Block a user