Browse Source

fix: global plugin read encoding

master
zhayujie 1 year ago
parent
commit
5176b56d3b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      plugins/plugin.py

+ 1
- 1
plugins/plugin.py View File

@@ -19,7 +19,7 @@ class Plugin:
# 全局配置不存在 或者 未开启全局配置开关,则获取插件目录下的配置 # 全局配置不存在 或者 未开启全局配置开关,则获取插件目录下的配置
plugin_config_path = os.path.join(self.path, "config.json") plugin_config_path = os.path.join(self.path, "config.json")
if os.path.exists(plugin_config_path): if os.path.exists(plugin_config_path):
with open(plugin_config_path, "r") as f:
with open(plugin_config_path, "r", encoding="utf-8") as f:
plugin_conf = json.load(f) plugin_conf = json.load(f)
logger.debug(f"loading plugin config, plugin_name={self.name}, conf={plugin_conf}") logger.debug(f"loading plugin config, plugin_name={self.name}, conf={plugin_conf}")
return plugin_conf return plugin_conf


Loading…
Cancel
Save