diff options
author | 2022-03-03 22:02:06 +0000 | |
---|---|---|
committer | 2022-03-03 22:02:06 +0000 | |
commit | a96f9e3c2120c4484726e01dd355f775ac4eabcd (patch) | |
tree | b00d04c2bff7b3061820e7984f71420a429be7a3 /docs/utils.py | |
parent | Merge pull request #34 from python-discord/feat/site-api-wrapper (diff) | |
parent | Document 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.py | 5 |
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__"): |