Log plugin load time

This commit is contained in:
shortcutme 2018-06-25 14:29:51 +02:00
parent e564470490
commit 05fb60f809
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -36,6 +36,7 @@ class PluginManager:
# Load all plugin
def loadPlugins(self):
s = time.time()
for dir_name in sorted(os.listdir(self.plugin_path)):
dir_path = os.path.join(self.plugin_path, dir_name)
if dir_name.startswith("disabled"):
@ -52,6 +53,7 @@ class PluginManager:
if dir_name not in self.plugin_names:
self.plugin_names.append(dir_name)
self.log.debug("Plugins loaded in %.3fs" % (time.time() - s))
for func in self.after_load:
func()