Dont use an f-string in check_version_info since it will cause a syntaxerror on older python

This commit is contained in:
Kovid Goyal 2021-09-30 13:44:56 +05:30
parent cc682db2ba
commit 33353ef3a7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -14,7 +14,7 @@ def check_version_info(minver=(3, 7, 0)):
if vi < minver: if vi < minver:
def fmt(v): def fmt(v):
return '.'.join(map(str, v[:3])) return '.'.join(map(str, v[:3]))
exit(f'calibre requires Python >= {fmt(minver)}. Current Python version: {fmt(vi)}') exit('calibre requires Python >= {}. Current Python version: {}'.format(fmt(minver), fmt(vi)))
check_version_info() check_version_info()