Skip to content

Commit 15bb7b5

Browse files
committed
hotfix: bad default_time value type introduced in #300
1 parent 9b88745 commit 15bb7b5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mkdocs_rss_plugin/plugin.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,19 @@ def on_config(self, config: MkDocsConfig) -> MkDocsConfig:
168168
self.config.date_from_meta.default_time = datetime.strptime(
169169
self.config.date_from_meta.default_time, "%H:%M"
170170
)
171+
print(
172+
self.config.date_from_meta.default_time,
173+
type(self.config.date_from_meta.default_time),
174+
)
171175
except (TypeError, ValueError) as err:
172176
logger.warning(
173177
"Config error: `date_from_meta.default_time` value "
174178
f"'{self.config.date_from_meta.default_time}' format doesn't match the "
175179
f"expected format %H:%M. Fallback to the default value. Trace: {err}"
176180
)
177-
self.config.date_from_meta.default_time = "00:00"
181+
self.config.date_from_meta.default_time = datetime.strptime(
182+
"00:00", "%H:%M"
183+
)
178184

179185
if self.config.use_git:
180186
logger.debug(

0 commit comments

Comments
 (0)