fix the calculation used for finding release history

reversed() must be passed a sequence data structure, not a generator.

We cannot slide the result of reversed() so turn it back into a list
so we can slice it.

Include all of the series starting with and including the one given so
that when it is the final series we can still include it in
calculations.

Change-Id: Idbaab36014271c7a60bec6d8a04fc69d51eb13d1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-07-19 11:52:07 -04:00
parent 435cba220c
commit 6647d6a6b4

View File

@ -116,8 +116,8 @@ def get_release_history(series, deliverable):
included_series = ['_independent']
else:
status = series_status.SeriesStatus.default()
all_series = reversed(status.names)
included_series = all_series[all_series.index(series):-1]
all_series = list(reversed(list(status.names)))
included_series = all_series[all_series.index(series):]
release_history = []
for current_series in included_series:
try: