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')