summaryrefslogtreecommitdiff
path: root/weechat_notify.py
diff options
context:
space:
mode:
authorSimeon Simeonov2013-12-20 21:42:03 +0100
committerSimeon Simeonov2013-12-20 21:42:03 +0100
commit504c118c5535d3e2e1c943e9ae354b1048604be3 (patch)
tree850a9778209c0ddcac0ac5a11a71567f1a08fb36 /weechat_notify.py
parent66104b45b6f09076dd1f0db621d0d6987ff4f03e (diff)
Several modifications
Diffstat (limited to 'weechat_notify.py')
-rwxr-xr-xweechat_notify.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/weechat_notify.py b/weechat_notify.py
index f070551..897f26d 100755
--- a/weechat_notify.py
+++ b/weechat_notify.py
@@ -13,6 +13,7 @@ POLLING_FREQUENCY = 10
13NOTIFICATION_URL = 'https://simeon.simeonov.no:40004/notifications/' 13NOTIFICATION_URL = 'https://simeon.simeonov.no:40004/notifications/'
14TIMEOUT_SEC = 3 14TIMEOUT_SEC = 3
15 15
16
16def poll_notifications(scheduler): 17def poll_notifications(scheduler):
17 """ 18 """
18 """ 19 """
@@ -20,7 +21,7 @@ def poll_notifications(scheduler):
20 req = urllib2.Request(NOTIFICATION_URL) 21 req = urllib2.Request(NOTIFICATION_URL)
21 response = urllib2.urlopen(req) 22 response = urllib2.urlopen(req)
22 response_str = response.read() 23 response_str = response.read()
23 24
24 entries = json.loads(response_str) 25 entries = json.loads(response_str)
25 for entry in entries: 26 for entry in entries:
26 n = pynotify.Notification('IRC', entry, 'dialog-information') 27 n = pynotify.Notification('IRC', entry, 'dialog-information')