Skip to content

Commit 562498b

Browse files
committed
fix: 修复配置文件没有自动创建文件夹的问题
1 parent 9d2e2a3 commit 562498b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def concurreny_enable_cluster(self) -> bool:
8888
PROJECT = "PythonOpenBMCLAPI"
8989
USER_AGENT = f"openbmclapi-cluster/{API_VERSION} {PROJECT}/{VERSION}"
9090
ROOT_PATH = Path(__file__).parent.parent
91+
ROOT = ROOT_PATH / "config"
9192
DEFAULT_CONFIG = {
9293
"advanced.locale": "zh_cn",
9394
"advanced.debug": False,
@@ -101,6 +102,8 @@ def concurreny_enable_cluster(self) -> bool:
101102
"cert.cert": None,
102103
}
103104

105+
ROOT.mkdir(exist_ok=True, parents=True)
106+
104107
cfg = Config()
105108

106109
DEBUG = bool(cfg.get("advanced.debug")) or False

0 commit comments

Comments
 (0)