turn on warning-is-error in sphinx build

Fix a formatting error in one docstring and turn on the flag to ensure
that future warnings in the doc build trigger a build failure.

Change-Id: I7159b985d1690a8ae61ff885408da4623c105952
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann
2017-06-15 16:58:36 -04:00
parent 4565e2bf45
commit c859380718
3 changed files with 3 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
============================================== ==============================================
This is a client for the OpenStack Images API. There's :doc:`a Python This is a client for the OpenStack Images API. There's :doc:`a Python
API <library/api/index>` (the :mod:`glanceclient` module) and a API <reference/api/index>` (the :mod:`glanceclient` module) and a
:doc:`command-line script <cli/glance>` (installed as :doc:`command-line script <cli/glance>` (installed as
:program:`glance`). :program:`glance`).

View File

@@ -311,7 +311,7 @@ def get_file_size(file_obj):
"""Analyze file-like object and attempt to determine its size. """Analyze file-like object and attempt to determine its size.
:param file_obj: file-like object. :param file_obj: file-like object.
:retval The file's size or None if it cannot be determined. :retval: The file's size or None if it cannot be determined.
""" """
if (hasattr(file_obj, 'seek') and hasattr(file_obj, 'tell') and if (hasattr(file_obj, 'seek') and hasattr(file_obj, 'tell') and
(six.PY2 or six.PY3 and file_obj.seekable())): (six.PY2 or six.PY3 and file_obj.seekable())):

View File

@@ -36,6 +36,7 @@ console_scripts =
[build_sphinx] [build_sphinx]
builders = html,man builders = html,man
all-files = 1 all-files = 1
warning-is-error = 1
source-dir = doc/source source-dir = doc/source
build-dir = doc/build build-dir = doc/build