Skip to content

Commit e082846

Browse files
authored
Fix regression 'File' object has no attribute 'src_dir', closes #99
1 parent 02fd840 commit e082846

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mkdocs_git_authors_plugin/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def on_files(
118118
if exclude(file.src_path, excluded_pages):
119119
continue
120120

121-
if file.src_dir is None:
121+
if not hasattr(file, 'src_dir') or file.src_dir is None:
122122
logger.debug(
123123
f"[git-authors-plugin] Unable to find path for file {file.src_path}. "
124124
"Generated, in-memory files won't have a git history."

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="mkdocs-git-authors-plugin",
8-
version="0.9.1",
8+
version="0.9.2",
99
description="Mkdocs plugin to display git authors of a page",
1010
long_description=long_description,
1111
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)