summaryrefslogtreecommitdiff
path: root/portato/plugin.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-07-05 02:53:57 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-07-05 02:53:57 +0200
commit30c88195ee02d4fa745c1c0202644ec143c57ba6 (patch)
treec74b0eebc71a7978e8baaec318b659a36dc0d789 /portato/plugin.py
parent4b65ea99facff3d93c017758b2205e4047a5d7d4 (diff)
downloadportato-30c88195ee02d4fa745c1c0202644ec143c57ba6.tar.gz
portato-30c88195ee02d4fa745c1c0202644ec143c57ba6.tar.bz2
portato-30c88195ee02d4fa745c1c0202644ec143c57ba6.zip
Better debug/info messages
Diffstat (limited to 'portato/plugin.py')
-rw-r--r--portato/plugin.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/portato/plugin.py b/portato/plugin.py
index e627eb1..716a9b2 100644
--- a/portato/plugin.py
+++ b/portato/plugin.py
@@ -197,6 +197,10 @@ class Plugin (object):
if disable:
self.status = self.STAT_HARD_DISABLED
+ # debug test
+ if hasattr(self, "widget_init") and not isinstance(self, WidgetPlugin):
+ debug("Plugin '%s' has an init_widget() function but is not a WidgetPlugin. Are you sure, this is correct?", self.name)
+
def _init (self):
"""
Method called from outside to init the extension parts of this plugin.
@@ -307,7 +311,7 @@ class WidgetPlugin (Plugin):
self.widget_init()
def widget_init (self):
- debug("No widgets to initialize. Wrong class used for plugin?")
+ debug("%s: No widgets to initialize. Wrong class used for plugin?", self.name)
def add_widget (self, slot, widget):
"""
@@ -442,6 +446,7 @@ class PluginQueue (object):
p._widget_init()
for w in p.widgets:
WidgetSlot.slots[w.slot].add_widget(w)
+ info(_("Widgets of plugin '%s' loaded."), p.name)
def add (self, plugin, disable = False):
"""