Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Log what URLs fail to be resolved. #274

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

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions sphinx_gallery/docs_resolv.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,13 @@ def _embed_code_links(app, gallery_conf, gallery_dir):
src_gallery_dir,
relative=True)
else:
doc_resolvers[this_module] = SphinxDocLinkResolver(url,
src_gallery_dir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what was this before? Just a bunch of extra white space?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a slightly awkward alignment which also made the line longer than 80 characters.

doc_resolvers[this_module] = SphinxDocLinkResolver(
url, src_gallery_dir)

except HTTPError as e:
logger.warning("The following HTTP Error has occurred: %d", e.code)
logger.warning(
"HTTP error %d has occured while trying to resolve %s",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mis-corrected the spelling of 'occurred'.

e.code, e.filename)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable to me...I say merge unless anybody objects

except URLError as e:
logger.warning(
"Embedding the documentation hyperlinks requires Internet "
Expand Down