diff options
author | Nate Damon <ndamon@moog.com> | 2019-10-24 09:58:46 -0400 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-10-26 16:56:41 +0900 |
commit | b813875b64eb6d4c2f566b7d3b821d13889a0a08 (patch) | |
tree | 41d55d271c5208d1b3dff4256c150fd46bfa6e2b /sphinx/builders/html.py | |
parent | b4eba53b5b31a1f5734e2887f3459a58687dd983 (diff) | |
download | sphinx-git-b813875b64eb6d4c2f566b7d3b821d13889a0a08.tar.gz |
specified the specific error message to except, so other value errors are still raised
Diffstat (limited to 'sphinx/builders/html.py')
-rw-r--r-- | sphinx/builders/html.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py index ee25473eb..9a70dfcd8 100644 --- a/sphinx/builders/html.py +++ b/sphinx/builders/html.py @@ -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) @@ -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) |