Переглянути джерело

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.


Завантаження…
Відмінити
Зберегти