Commits

Shrikant Sharat Kandula  committed 976f62f

Changed notification method to use pynotify instead of `notify-send` shell command

  • Participants
  • Parent commits 105652f

Comments (0)

Files changed (1)

File notification-daemon.py

 #-*- coding:utf-8 -*-
 
 import bottle as bl
-import subprocess as sp
+import pynotify as pn
 
 @bl.route('/')
 def notify():
     title = bl.request.GET.get('title')
     message = bl.request.GET.get('message')
-    sp.call('notify-send "' + title + '" "' + message + '"', shell=True)
+    pn.Notification(title, message).show()
 
 bl.run()