diff options
Diffstat (limited to 'weechat_notify.py')
| -rwxr-xr-x | weechat_notify.py | 3 |
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 | |||
| 13 | NOTIFICATION_URL = 'https://simeon.simeonov.no:40004/notifications/' | 13 | NOTIFICATION_URL = 'https://simeon.simeonov.no:40004/notifications/' |
| 14 | TIMEOUT_SEC = 3 | 14 | TIMEOUT_SEC = 3 |
| 15 | 15 | ||
| 16 | |||
| 16 | def poll_notifications(scheduler): | 17 | def 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') |
