builddoc: Treat '[pbr] autodoc_tree_excludes' as a multi-line opt

We were treating this a single line, comma- or space-delimited option.
This was incorrect and was causing issues for projects like neutron-lib
when Sphinx 1.7, which switches from optparse to the stricter argparse
was used. In addition, this project was including comments in the
multi-line opt. These were being passed through but Sphinx < 1.7 was
simply ignoring them. These are now filtered out.

Change-Id: I177edf0f44714175da220cf3a960b8f23aa4ab09
Closes-Bug: #1753082
This commit is contained in:
Stephen Finucane
2018-03-12 17:34:58 +00:00
committed by Stephen Finucane
parent 37a1ce7f85
commit 1fe0ceab39
2 changed files with 5 additions and 3 deletions

View File

@@ -580,7 +580,7 @@ def split_multiline(value):
value = [element for element in
(line.strip() for line in value.split('\n'))
if element]
if element and not element.startswith('#')]
return value