From 876d4addde09222cecc2ae9110d8d78b247782bb Mon Sep 17 00:00:00 2001 From: AliBsk Date: Fri, 27 Oct 2023 16:45:32 +0300 Subject: [PATCH] improve2 get_log_file --- py4web/server_adapters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py4web/server_adapters.py b/py4web/server_adapters.py index 5541ad201..d671595cd 100644 --- a/py4web/server_adapters.py +++ b/py4web/server_adapters.py @@ -26,7 +26,7 @@ # export PY4WEB_LOGS=/tmp # export PY4WEB_LOGS= def get_log_file(out_banner = True): log_dir = os.environ.get("PY4WEB_LOGS", None) - if os.path.isdir(log_dir): + if log_dir and os.path.isdir(log_dir): log_file = os.path.join (log_dir, 'server-py4web.log') if out_banner: print(f"log_file: {log_file}")