fix: strip date string
This commit is contained in:
@@ -29,7 +29,8 @@ DEBUG = os.environ.get('DEBUG', 'yes').lower() not in ['false', 'no', '0']
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
with open(BASE_DIR / 'build_date.txt', 'r') as fp:
|
with open(BASE_DIR / 'build_date.txt', 'r') as fp:
|
||||||
BUILD_DATE = datetime.fromisoformat(fp.read()).replace(tzinfo=TZ.utc)
|
raw_date = fp.read().strip()
|
||||||
|
BUILD_DATE = datetime.fromisoformat(raw_date).replace(tzinfo=TZ.utc)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
BUILD_DATE = None
|
BUILD_DATE = None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user