judge venus config exist

Change-Id: I368bae284a3a5acf172930ed1769216730e210a6
This commit is contained in:
JiaSiRui 2024-04-16 23:17:01 +08:00 committed by jiasirui
parent a28d51c503
commit 81058281be

View File

@ -28,9 +28,10 @@ def main():
CONF(sys.argv[1:], project='venus', CONF(sys.argv[1:], project='venus',
version=version.version_string()) version=version.version_string())
logdir = CONF.log_dir logdir = CONF.log_dir
is_exists = os.path.exists(logdir) if logdir:
if not is_exists: is_exists = os.path.exists(logdir)
os.makedirs(logdir) if not is_exists:
os.makedirs(logdir)
logging.setup(CONF, "venus") logging.setup(CONF, "venus")
server = service.WSGIService('osapi_venus') server = service.WSGIService('osapi_venus')