File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/mkdocs_git_revision_date_localized_plugin Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,21 @@ def get_git_commit_timestamp(
166
166
" To ignore this error, set option 'fallback_to_build_date: true'"
167
167
)
168
168
raise err
169
+ except Exception as err :
170
+ if self .config .get ('fallback_to_build_date' ):
171
+ log (
172
+ "[git-revision-date-localized-plugin] An unexpected error occurred: %s"
173
+ " Option 'fallback_to_build_date' set to 'true': Falling back to build date"
174
+ % str (err )
175
+ )
176
+ commit_timestamp = time .time ()
177
+ else :
178
+ logger .error (
179
+ "[git-revision-date-localized-plugin] An unexpected error occurred: %s"
180
+ " To ignore this error, set option 'fallback_to_build_date: true'"
181
+ % str (err )
182
+ )
183
+ raise err
169
184
170
185
# create timestamp
171
186
if commit_timestamp == "" :
You can’t perform that action at this time.
0 commit comments