1 Star 0 Fork 36

wangjh/A-Tune

forked from src-openEuler/A-Tune 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-start-failed-of-atuned-service.patch 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
gaoruoshu 提交于 2022-08-05 15:39 . fix start failed of atuned service
From 945560933e7e118b9113f152a5f133e1ff0af183 Mon Sep 17 00:00:00 2001
From: g00563147 <[email protected]>
Date: Thu, 3 Mar 2022 16:52:04 +0800
Subject: [PATCH] fix start failed of atuned service
---
analysis/app.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/analysis/app.py b/analysis/app.py
index e82e2b2..3a0c248 100644
--- a/analysis/app.py
+++ b/analysis/app.py
@@ -53,14 +53,14 @@ class App:
def startup_app(self, host, port, tls, cert_file, key_file, ca_file, log_level):
"""start flask app"""
- if not os.path.exists(cert_file) or not os.path.exists(key_file) or not os.path.exists(ca_file):
- LOGGER.error("Startup failed. Please provide the authentication certificate.")
- raise FileNotFoundError("Startup failed. Please provide the authentication certificate.")
level = logging.getLevelName(log_level.upper())
self.config_log(level)
self.add_resource()
context = None
if tls:
+ if not os.path.exists(cert_file) or not os.path.exists(key_file) or not os.path.exists(ca_file):
+ LOGGER.error("Startup failed. Please provide the authentication certificate.")
+ raise FileNotFoundError("Startup failed. Please provide the authentication certificate.")
context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
context.load_cert_chain(certfile=cert_file, keyfile=key_file)
context.load_verify_locations(ca_file)
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangjh1121/A-Tune.git
[email protected]:wangjh1121/A-Tune.git
wangjh1121
A-Tune
A-Tune
master

搜索帮助