Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion mkdocs_macros/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,12 @@ def _load_modules(self):
trace("Found local Python module '%s' in:" % local_module_name,
self.project_dir)
self._load_module(module, local_module_name)
except ImportError:
except ImportError as e:
if local_module_name == DEFAULT_MODULE_NAME:
module_path = os.path.join(self.project_dir,
local_module_name + '.py')
if os.path.isfile(module_path):
raise
# do not do anything if there is no main module
trace("No default module `%s` found" % DEFAULT_MODULE_NAME)
else:
Expand Down