fixing fstring
This commit is contained in:
parent
e3426d2124
commit
0f8c0ad9bf
9 changed files with 17 additions and 19 deletions
|
|
@ -59,7 +59,7 @@ def datetime(entry, option_key="Datetime", account=None, from_tz=None, **kwargs)
|
|||
|
||||
"""
|
||||
if not entry:
|
||||
raise ValueError(_(f"No {option_key} entered!"))
|
||||
raise ValueError(_("No {option_key} entered!".format(option_key=option_key)))
|
||||
if not from_tz:
|
||||
from_tz = _pytz.UTC
|
||||
if account:
|
||||
|
|
@ -67,7 +67,7 @@ def datetime(entry, option_key="Datetime", account=None, from_tz=None, **kwargs)
|
|||
try:
|
||||
from_tz = _pytz.timezone(acct_tz)
|
||||
except Exception as err:
|
||||
raise ValueError(_(f"Timezone string '{acct_tz}' is not a valid timezone ({err})"))
|
||||
raise ValueError(_("Timezone string '{acct_tz}' is not a valid timezone ({err})".format(acct_tz=acct_tz, err=err)))
|
||||
else:
|
||||
from_tz = _pytz.UTC
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue