Make setup.py compatible with older pythons

This caused some annoying downstream failures I'd rather not fix right now.
This commit is contained in:
Shane McDonald 2021-10-05 12:15:59 -04:00
parent fcdda8d7a7
commit f67a2d2f46
No known key found for this signature in database
GPG Key ID: 6F374AF6E9EB9374
2 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,8 @@ def use_scm_version():
def get_version_from_file():
if vf := version_file():
vf = version_file()
if vf:
with open(vf, 'r') as file:
return file.read().strip()

View File

@ -23,7 +23,8 @@ def use_scm_version():
def get_version_from_file():
if vf := version_file():
vf = version_file()
if vf:
with open(vf, 'r') as file:
return file.read().strip()