mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #6148 from lsaffre/1.8
Fixed a bug in intersphinx failure reporting
This commit is contained in:
commit
e8294ccd41
@ -183,7 +183,7 @@ def fetch_inventory(app, uri, inv):
|
|||||||
f = open(path.join(app.srcdir, inv), 'rb')
|
f = open(path.join(app.srcdir, inv), 'rb')
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
err.args = ('intersphinx inventory %r not fetchable due to %s: %s',
|
err.args = ('intersphinx inventory %r not fetchable due to %s: %s',
|
||||||
inv, err.__class__, err)
|
inv, err.__class__, str(err))
|
||||||
raise
|
raise
|
||||||
try:
|
try:
|
||||||
if hasattr(f, 'url'):
|
if hasattr(f, 'url'):
|
||||||
@ -201,7 +201,7 @@ def fetch_inventory(app, uri, inv):
|
|||||||
raise ValueError('unknown or unsupported inventory version: %r' % exc)
|
raise ValueError('unknown or unsupported inventory version: %r' % exc)
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
err.args = ('intersphinx inventory %r not readable due to %s: %s',
|
err.args = ('intersphinx inventory %r not readable due to %s: %s',
|
||||||
inv, err.__class__.__name__, err)
|
inv, err.__class__.__name__, str(err))
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
return invdata
|
return invdata
|
||||||
@ -265,10 +265,9 @@ def load_mappings(app):
|
|||||||
for fail in failures:
|
for fail in failures:
|
||||||
logger.info(*fail)
|
logger.info(*fail)
|
||||||
else:
|
else:
|
||||||
|
issues = '\n'.join([f[0] % f[1:] for f in failures])
|
||||||
logger.warning(__("failed to reach any of the inventories "
|
logger.warning(__("failed to reach any of the inventories "
|
||||||
"with the following issues:"))
|
"with the following issues:") + "\n" + issues)
|
||||||
for fail in failures:
|
|
||||||
logger.warning(*fail)
|
|
||||||
|
|
||||||
if update:
|
if update:
|
||||||
inventories.clear()
|
inventories.clear()
|
||||||
|
Loading…
Reference in New Issue
Block a user