From aa933f29673f9272c57312200518bb2effd19a30 Mon Sep 17 00:00:00 2001 From: Sophist Date: Thu, 1 May 2014 13:53:04 +0100 Subject: [PATCH 1/2] Make warnings show if not debugging --- picard/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/picard/plugin.py b/picard/plugin.py index 049abc013..83f2dce9b 100644 --- a/picard/plugin.py +++ b/picard/plugin.py @@ -154,7 +154,7 @@ class PluginManager(QtCore.QObject): def load_plugindir(self, plugindir): plugindir = os.path.normpath(plugindir) if not os.path.isdir(plugindir): - log.debug("Plugin directory %r doesn't exist", plugindir) + log.warning("Plugin directory %r doesn't exist", plugindir) return names = set() for path in [os.path.join(plugindir, file) for file in os.listdir(plugindir)]: @@ -179,7 +179,7 @@ class PluginManager(QtCore.QObject): index = None for i, p in enumerate(self.plugins): if name == p.module_name: - log.debug("Module %r conflict: unregistering previously" \ + log.warning("Module %r conflict: unregistering previously" \ " loaded %r version %s from %r", p.module_name, p.name, @@ -233,7 +233,7 @@ class PluginManager(QtCore.QObject): if plugin is not None: self.plugin_installed.emit(plugin, False) except (OSError, IOError): - log.debug("Unable to copy %s to plugin folder %s" % (path, USER_PLUGIN_DIR)) + log.warning("Unable to copy %s to plugin folder %s" % (path, USER_PLUGIN_DIR)) def enabled(self, name): return True From 4f063f7831146ef1865b75296b3c95492c3faf7d Mon Sep 17 00:00:00 2001 From: Sophist Date: Thu, 1 May 2014 14:56:33 +0100 Subject: [PATCH 2/2] Make plugins load in consistent order. See http://forums.musicbrainz.org/viewtopic.php?id=4939. --- picard/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/picard/plugin.py b/picard/plugin.py index 83f2dce9b..844dd2252 100644 --- a/picard/plugin.py +++ b/picard/plugin.py @@ -164,7 +164,7 @@ class PluginManager(QtCore.QObject): log.debug("Looking for plugins in directory %r, %d names found", plugindir, len(names)) - for name in names: + for name in sorted(names): self.load_plugin(name, plugindir) def load_plugin(self, name, plugindir):