summaryrefslogtreecommitdiff
path: root/plugins/notify.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-07-28 12:51:08 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-07-28 12:51:08 +0200
commit9a33be6294316f6a974b87ea67d363c9ddcb5798 (patch)
tree69290133baead393001c95341c30abf263f6ad79 /plugins/notify.py
parent91758613ba284f6bda3ac0c8ffe34f1a8b308e95 (diff)
downloadportato-9a33be6294316f6a974b87ea67d363c9ddcb5798.tar.gz
portato-9a33be6294316f6a974b87ea67d363c9ddcb5798.tar.bz2
portato-9a33be6294316f6a974b87ea67d363c9ddcb5798.zip
Make the plugins print warnings, if they get disabled due to missing imports
Diffstat (limited to '')
-rw-r--r--plugins/notify.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/notify.py b/plugins/notify.py
index 8f21de5..3670e20 100644
--- a/plugins/notify.py
+++ b/plugins/notify.py
@@ -12,16 +12,17 @@
disable = False
-try:
- import pynotify
-except ImportError:
- disable = True
-
from portato import get_listener
from portato.helper import warning, error, debug
from portato.constants import APP_ICON, APP
+try:
+ import pynotify
+except ImportError:
+ disable = True
+ warning("NOTIFY :: %s", _("Cannot import 'pynotify'."))
+
class Notify (Plugin):
__author__ = "René 'Necoro' Neumann"
__description__ = "Show notifications when an emerge process finishes."