Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug in intersphinx failure reporting #6139

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions sphinx/ext/intersphinx.py
Expand Up @@ -173,7 +173,7 @@ def fetch_inventory(app, uri, inv):
f = open(path.join(app.srcdir, inv), 'rb')
except Exception as err:
err.args = ('intersphinx inventory %r not fetchable due to %s: %s',
inv, err.__class__, err)
inv, err.__class__, str(err))
raise
try:
if hasattr(f, 'url'):
Expand All @@ -191,7 +191,7 @@ def fetch_inventory(app, uri, inv):
raise ValueError('unknown or unsupported inventory version: %r' % exc)
except Exception as err:
err.args = ('intersphinx inventory %r not readable due to %s: %s',
inv, err.__class__.__name__, err)
inv, err.__class__.__name__, str(err))
raise
else:
return invdata
Expand Down Expand Up @@ -234,10 +234,9 @@ def load_mappings(app):
for fail in failures:
logger.info(*fail)
else:
issues = '\n'.join([f[0] % f[1:] for f in failures])
logger.warning(__("failed to reach any of the inventories "
"with the following issues:"))
for fail in failures:
logger.warning(*fail)
"with the following issues:") + "\n" + issues)

if update:
inventories.clear()
Expand Down