瀏覽代碼

Fix loading a config file after creating a new one from a semi-complete state.

tags/v0.1^2
Ben Kurtovic 12 年之前
父節點
當前提交
4f2ab2ca8d
共有 1 個檔案被更改,包括 9 行新增8 行删除
  1. +9
    -8
      earwigbot/config/__init__.py

+ 9
- 8
earwigbot/config/__init__.py 查看文件

@@ -277,15 +277,16 @@ class BotConfig(object):
if not path.exists(self._config_path):
self._handle_missing_config()
self._load()
data = self._data
if not data:
if not self._data:
self._handle_missing_config()
self.components._load(data.get("components", OrderedDict()))
self.wiki._load(data.get("wiki", OrderedDict()))
self.irc._load(data.get("irc", OrderedDict()))
self.commands._load(data.get("commands", OrderedDict()))
self.tasks._load(data.get("tasks", OrderedDict()))
self.metadata._load(data.get("metadata", OrderedDict()))
self._load()

self.components._load(self._data.get("components", OrderedDict()))
self.wiki._load(self._data.get("wiki", OrderedDict()))
self.irc._load(self._data.get("irc", OrderedDict()))
self.commands._load(self._data.get("commands", OrderedDict()))
self.tasks._load(self._data.get("tasks", OrderedDict()))
self.metadata._load(self._data.get("metadata", OrderedDict()))

self._setup_logging()
if self.is_encrypted():


Loading…
取消
儲存