aboutsummaryrefslogtreecommitdiffstats
path: root/docs/utils.py
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2022-03-03 22:02:06 +0000
committerGravatar GitHub <[email protected]>2022-03-03 22:02:06 +0000
commita96f9e3c2120c4484726e01dd355f775ac4eabcd (patch)
treeb00d04c2bff7b3061820e7984f71420a429be7a3 /docs/utils.py
parentMerge pull request #34 from python-discord/feat/site-api-wrapper (diff)
parentDocument breaking monkey patch change (diff)
Merge pull request #35 from python-discord/monkey-patch-in-util-namespacev3.0.0
Monkey patch in util namespace
Diffstat (limited to 'docs/utils.py')
-rw-r--r--docs/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/utils.py b/docs/utils.py
index 76b3e098..9116c130 100644
--- a/docs/utils.py
+++ b/docs/utils.py
@@ -105,7 +105,10 @@ def __get_included() -> set[str]:
"""Get a list of files that should be included in the final build."""
def get_all_from_module(module_name: str) -> set[str]:
- module = importlib.import_module(module_name)
+ try:
+ module = importlib.import_module(module_name)
+ except ModuleNotFoundError:
+ return {}
_modules = {module.__name__ + ".rst"}
if hasattr(module, "__all__"):