Merge "Add debian to list of distros"

This commit is contained in:
Jenkins 2017-01-16 10:13:08 +00:00 committed by Gerrit Code Review
commit 15e6be989d
1 changed files with 7 additions and 2 deletions

View File

@ -253,11 +253,16 @@ class ParseBlocks(object):
command = CodeBlock()
# Simple helper function.
def getdistro(distro):
"""Return distros named in code block title"""
distro = distro.replace('.. only::', '').split('or')
return [d.strip() for d in distro]
distro = getdistro(distro) if distro else ["ubuntu", "obs", "rdo"]
# Having the list of distros hardcoded here is not ideal. The list
# could be generated from openstack-manuals' tox.ini or by searching
# for all named distros in all '.. only::' titles, or it could be part
# of the configuration file.
distro = getdistro(distro) if distro else ["debian", "ubuntu", "obs",
"rdo"]
if path:
path = path.replace('.. path', '').strip()