Skip to content
Commits on Source (4)
debian-edu-config (2.11.7) UNRELEASED; urgency=medium
* etc/ltspfs/mounter.d/edu-notify:
Adjust for using notity2 instead of pynotify.
* debian/control: Replace python-notify with python3-notify2. Closes: #943573
Thanks to Jeremy Bicha.
* debian/control: Add Depends on python3, thanks Lintian.
-- Wolfgang Schweer <wschweer@arcor.de> Sun, 27 Oct 2019 14:27:59 +0100
debian-edu-config (2.11.6) unstable; urgency=medium
[ Wolfgang Schweer ]
......
......@@ -57,7 +57,8 @@ Depends: ${misc:Depends},
openssl,
patch,
python,
python-notify,
python3,
python3-notify2,
ssl-cert,
swaks,
tftp-hpa | tftp,
......
#!/usr/bin/python
# requires python-notify
import pynotify
#!/usr/bin/python3
# requires python3-notify2
import notify2
import sys
import string
import os
......@@ -8,8 +8,8 @@ import os
xdgdirs = os.environ.get('XDG_DATA_DIRS')
if xdgdirs and -1 != xdgdirs.find("/usr/share/gnome"):
sys.exit(0)
if not pynotify.init("edu-notify"):
if not notify2.init("edu-notify"):
sys.exit(1)
n = pynotify.Notification("ltspfs","%s" % sys.argv[1]+' '+sys.argv[2])
n = notify2.Notification("ltspfs","%s" % sys.argv[1]+' '+sys.argv[2])
n.set_timeout(5000) # show notification for 5 seconds
n.show()