Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-07-04 19:32:54 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-07-04 19:32:54 +0300
commitec3754bd94eaa3aa3c5410ee6ab100bb27bfb798 (patch)
treed0446a967a4f8cbc3208d48d6bf3d9b7c90ca25e /sphinx/environment
parentb268963709dc9256cf711d4cc054a86e70226702 (diff)
parent9fd9edebb47a3a5eda8c6065b12b71cdb0985a73 (diff)
Merge branch '3.x'
Diffstat (limited to 'sphinx/environment')
-rw-r--r--sphinx/environment/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sphinx/environment/__init__.py b/sphinx/environment/__init__.py
index 9451d1451..6de352498 100644
--- a/sphinx/environment/__init__.py
+++ b/sphinx/environment/__init__.py
@@ -376,7 +376,8 @@ class BuildEnvironment:
if catalog.domain == domain:
self.dependencies[docname].add(catalog.mo_path)
except OSError as exc:
- raise DocumentError(__('Failed to scan documents in %s: %r') % (self.srcdir, exc))
+ raise DocumentError(__('Failed to scan documents in %s: %r') %
+ (self.srcdir, exc)) from exc
def get_outdated_files(self, config_changed: bool) -> Tuple[Set[str], Set[str], Set[str]]:
"""Return (added, changed, removed) sets."""
@@ -501,8 +502,8 @@ class BuildEnvironment:
"""
try:
return self.domains[domainname]
- except KeyError:
- raise ExtensionError(__('Domain %r is not registered') % domainname)
+ except KeyError as exc:
+ raise ExtensionError(__('Domain %r is not registered') % domainname) from exc
# --------- RESOLVING REFERENCES AND TOCTREES ------------------------------