summaryrefslogtreecommitdiff
path: root/plugins/notify.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-09-02 13:01:17 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-09-02 13:01:17 +0200
commitafa1de13f0576ace6dcbb0176490fd20922950cd (patch)
tree056a5fd646f53dfa83f2fe231ec0943747b15ffc /plugins/notify.py
parent02d96210d9102f0cdec95b4e0f595cbd8fdd1e10 (diff)
downloadportato-afa1de13f0576ace6dcbb0176490fd20922950cd.tar.gz
portato-afa1de13f0576ace6dcbb0176490fd20922950cd.tar.bz2
portato-afa1de13f0576ace6dcbb0176490fd20922950cd.zip
Switch from tabs to 4 spaces
Diffstat (limited to 'plugins/notify.py')
-rw-r--r--plugins/notify.py48
1 files changed, 24 insertions, 24 deletions
diff --git a/plugins/notify.py b/plugins/notify.py
index 6446812..7a3776a 100644
--- a/plugins/notify.py
+++ b/plugins/notify.py
@@ -13,9 +13,9 @@
disable = False
try:
- import pynotify
+ import pynotify
except ImportError:
- disable = True
+ disable = True
from portato import get_listener
@@ -23,27 +23,27 @@ from portato.helper import warning, error, debug
from portato.constants import APP_ICON, APP
class Notify (Plugin):
- __author__ = "René 'Necoro' Neumann"
- __description__ = "Show notifications when an emerge process finishes."
- __dependency__ = ["dev-python/notify-python"]
-
- def init (self):
- self.add_call("after_emerge", self.notify)
-
- def notify (self, retcode, **kwargs):
- if retcode is None:
- warning("NOTIFY :: %s", _("Notify called while process is still running!"))
- else:
- icon = APP_ICON
- if retcode == 0:
- text = _("Emerge finished!")
- descr = ""
- urgency = pynotify.URGENCY_NORMAL
- else:
- text = _("Emerge failed!")
- descr = _("Error Code: %d") % retcode
- urgency = pynotify.URGENCY_CRITICAL
-
- get_listener().send_notify(base = text, descr = descr, icon = icon, urgency = urgency)
+ __author__ = "René 'Necoro' Neumann"
+ __description__ = "Show notifications when an emerge process finishes."
+ __dependency__ = ["dev-python/notify-python"]
+
+ def init (self):
+ self.add_call("after_emerge", self.notify)
+
+ def notify (self, retcode, **kwargs):
+ if retcode is None:
+ warning("NOTIFY :: %s", _("Notify called while process is still running!"))
+ else:
+ icon = APP_ICON
+ if retcode == 0:
+ text = _("Emerge finished!")
+ descr = ""
+ urgency = pynotify.URGENCY_NORMAL
+ else:
+ text = _("Emerge failed!")
+ descr = _("Error Code: %d") % retcode
+ urgency = pynotify.URGENCY_CRITICAL
+
+ get_listener().send_notify(base = text, descr = descr, icon = icon, urgency = urgency)
register(Notify, disable)