Minor edit

This commit is contained in:
Anas 2022-10-31 03:55:25 +02:00 committed by GitHub
parent afdae3f2a7
commit 49c2e165b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,8 +2,10 @@ from anytree import NodeMixin
from re import findall as re_findall
from os import environ
DOWNLOAD_DIR = environ.get('DOWNLOAD_DIR')
if not DOWNLOAD_DIR.endswith("/"):
DOWNLOAD_DIR = environ.get('DOWNLOAD_DIR', '')
if len(DOWNLOAD_DIR) == 0:
DOWNLOAD_DIR = '/usr/src/app/downloads/'
elif not DOWNLOAD_DIR.endswith("/"):
DOWNLOAD_DIR = f'{DOWNLOAD_DIR}/'