The Timeline custom Sphinx directive expected exactly three active
releases listed as arguments. While this is fine for the usual situation
of three active releases, improving the directive to support any number
of active releases may benefit e.g. testing.
Previously, using anything other than 3 release names in the
releases/index.rst ceph_timeline directive caused the release dates
table to not be rendered.
Use the same pattern as the TimelineGantt custom directive by requiring
two arguments, with the second argument being a space-separated string
of release names.
Signed-off-by: Ville Ojamo <14869000+bluikko@users.noreply.github.com>
class CephTimeline(Directive):
has_content = False
- required_arguments = 4
+ required_arguments = 2
optional_arguments = 0
option_spec = {}
+ final_argument_whitespace = True
def run(self):
filename = self.arguments[0]
"Failed to open Ceph releases file {}: {}".format(filename, e),
line=self.lineno)]
- display_releases = self.arguments[1:]
+ display_releases = self.arguments[1].split()
timeline = []
for code_name, info in releases["releases"].items():