Skip to content

Commit

Permalink
specified the specific error message to except, so other value errors…
Browse files Browse the repository at this point in the history
… are still raised
  • Loading branch information
Nate Damon authored and tk0miya committed Oct 26, 2019
1 parent b4eba53 commit b813875
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sphinx/builders/html.py
Expand Up @@ -1165,7 +1165,9 @@ def validate_html_extra_path(app: Sphinx, config: Config) -> None:
else:
try:
common_path = path.commonpath([app.outdir, extra_path])
except ValueError: # different directories, can skip to next
except ValueError as e: # different directories, can skip to next
if e.args[0] != "Paths don't have the same drive":
raise e
continue
if common_path == app.outdir:
logger.warning(__('html_extra_path entry %r is placed inside outdir'), entry)
Expand All @@ -1182,7 +1184,9 @@ def validate_html_static_path(app: Sphinx, config: Config) -> None:
else:
try:
common_path = path.commonpath([app.outdir, static_path])
except ValueError: # different directories, can skip to next
except ValueError as e: # different directories, can skip to next
if e.args[0] != "Paths don't have the same drive":
raise e
continue
if common_path == app.outdir:
logger.warning(__('html_static_path entry %r is placed inside outdir'), entry)
Expand Down

0 comments on commit b813875

Please sign in to comment.