From 9a33be6294316f6a974b87ea67d363c9ddcb5798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Tue, 28 Jul 2009 12:51:08 +0200 Subject: Make the plugins print warnings, if they get disabled due to missing imports --- plugins/notify.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'plugins/notify.py') 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." -- cgit v1.2.3