瀏覽代碼

Log should be a bit nicer when we don't load any resources.

tags/v0.1^2
Ben Kurtovic 12 年之前
父節點
當前提交
c2de168cb4
共有 1 個檔案被更改,包括 6 行新增3 行删除
  1. +6
    -3
      earwigbot/managers.py

+ 6
- 3
earwigbot/managers.py 查看文件

@@ -155,9 +155,12 @@ class _ResourceManager(object):
self._load_directory(builtin_dir) # Built-in resources
self._load_directory(plugins_dir) # Custom resources, aka plugins

msg = "Loaded {0} {1}: {2}"
resources = ", ".join(self._resources.keys())
self.logger.info(msg.format(len(self._resources), name, resources))
if self._resources:
msg = "Loaded {0} {1}: {2}"
resources = ", ".join(self._resources.keys())
self.logger.info(msg.format(len(self._resources), name, resources))
else:
self.logger.info("Loaded 0 {0}".format(name))

def get(self, key):
"""Return the class instance associated with a certain resource.


Loading…
取消
儲存