Merge pull request #6487 from tk0miya/6486_UnboundLocalError

Fix #6486: UnboundLocalError is raised if broken extension installed
This commit is contained in:
Takeshi KOMIYA 2019-06-15 23:03:21 +09:00 committed by GitHub
commit fd83dd8c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ Bugs fixed
* #1125: html theme: scrollbar is hard to see on classic theme and macOS * #1125: html theme: scrollbar is hard to see on classic theme and macOS
* #5502: linkcheck: Consider HTTP 503 response as not an error * #5502: linkcheck: Consider HTTP 503 response as not an error
* #6439: Make generated download links reproducible * #6439: Make generated download links reproducible
* #6486: UnboundLocalError is raised if broken extension installed
Testing Testing
-------- --------

View File

@ -188,7 +188,7 @@ class sphinx_domains:
def __exit__(self, exc_type: Type[Exception], exc_value: Exception, traceback: Any) -> bool: # NOQA def __exit__(self, exc_type: Type[Exception], exc_value: Exception, traceback: Any) -> bool: # NOQA
self.disable() self.disable()
return True return False
def enable(self) -> None: def enable(self) -> None:
self.directive_func = directives.directive self.directive_func = directives.directive