From 81058281bece95f7a0ed03bf6cbd5436956eff41 Mon Sep 17 00:00:00 2001 From: JiaSiRui Date: Tue, 16 Apr 2024 23:17:01 +0800 Subject: [PATCH] judge venus config exist Change-Id: I368bae284a3a5acf172930ed1769216730e210a6 --- venus/cmd/api.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/venus/cmd/api.py b/venus/cmd/api.py index ddbfc30..47d3ffd 100644 --- a/venus/cmd/api.py +++ b/venus/cmd/api.py @@ -28,9 +28,10 @@ def main(): CONF(sys.argv[1:], project='venus', version=version.version_string()) logdir = CONF.log_dir - is_exists = os.path.exists(logdir) - if not is_exists: - os.makedirs(logdir) + if logdir: + is_exists = os.path.exists(logdir) + if not is_exists: + os.makedirs(logdir) logging.setup(CONF, "venus") server = service.WSGIService('osapi_venus')