Merge pull request 'Fix hub logger' (#4) from fix_hub_logger into main

Reviewed-on: https://nextgenerations-cities.encs.concordia.ca/gitea/CERC/hub/pulls/4
This commit is contained in:
Koa Wells 2023-03-16 11:29:54 -04:00
commit f0953bfccc

View File

@ -6,7 +6,7 @@ log_dir = (Path(__file__).parent.parent / 'logs').resolve()
log_file = (log_dir / 'hub.log').resolve()
try:
if not os.path.isfile(log_file):
if not os.path.exists:
if not os.path.exists(log_dir):
os.mkdir(log_dir)
with open(log_file, 'x'):
pass