mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-13 18:11:03 +08:00
Fix test
This commit is contained in:
@@ -32,7 +32,6 @@ class Settings(Config):
|
||||
# load from env
|
||||
load_dotenv(".env")
|
||||
self.__load_from_env()
|
||||
os.makedirs(CONFIG_PATH, exist_ok=True)
|
||||
self.save()
|
||||
|
||||
def load(self):
|
||||
@@ -45,6 +44,8 @@ class Settings(Config):
|
||||
def save(self, config_dict: dict | None = None):
|
||||
if not config_dict:
|
||||
config_dict = self.dict()
|
||||
if not os.path.exists("config"):
|
||||
os.makedirs("config")
|
||||
with open(CONFIG_PATH, "w", encoding="utf-8") as f:
|
||||
json.dump(config_dict, f, indent=4)
|
||||
logger.info(f"Config saved")
|
||||
|
||||
Reference in New Issue
Block a user