1
from gettext import lgettext as _
4
from portato import get_listener
6
from portato.helper import warning, error, debug
7
from portato.constants import APP_ICON, APP
9
def notify (retcode, **kwargs):
11
warning(_("Notify called while process is still running!"))
15
text = _("Emerge finished!")
17
urgency = pynotify.URGENCY_NORMAL
19
text = _("Emerge failed!")
20
descr = _("Error Code: %d") % retcode
21
urgency = pynotify.URGENCY_CRITICAL
23
get_listener().send_notify(base = text, descr = descr, icon = icon, urgency = urgency)