Comment 18 for bug 1755783

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to oslo.config (master)

Reviewed: https://review.openstack.org/554632
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=eb6b43ba06698d37e2d8090335e0082f0a6dfdb5
Submitter: Zuul
Branch: master

commit eb6b43ba06698d37e2d8090335e0082f0a6dfdb5
Author: Stephen Finucane <email address hidden>
Date: Tue Mar 20 16:29:07 2018 +0000

    sphinxext: Reporting correct lines for errors

    Previously, we had an issue whereby errors found in the generated source
    would result in the following, rather unhelpful error messages:

      <oslo_config.sphinxext>:1: WARNING: Unexpected indentation.

    Turns out that the 'ViewList.append' function takes a third argument,
    'offset', to indicate where in the source an error is occurring. Start
    using this to improve the quality of the error messages we get from
    poorly formatted options. Given that we don't actually modify the source
    file, it's also necessary to write the output from the directive to an
    intermediate temp file.

    This also fixes the order of imports, given that we're adding new
    imports as we go.

    Change-Id: I6f6796629705926dbed5015f20d47187b77c9c50
    Related-Bug: #1755783