Add Value error

This commit is contained in:
shenjack 2023-10-24 22:10:43 +08:00
parent 38b7e4f176
commit a5c011a1aa
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -60,7 +60,7 @@ class BaseFormatter(Options):
try:
return template.substitute(**info)
except KeyError:
except (KeyError, ValueError):
return template.safe_substitute(**info)
def _format(self, message: FormattingMessage) -> FormattingMessage: