summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimeon Simeonov2017-05-16 20:00:22 +0200
committerSimeon Simeonov2017-05-16 20:00:22 +0200
commit0b0f1c999304ae61ecad430aad5e0397a2810f0b (patch)
tree9f1cc861507fe7f1b0ec467b51587d8e4d4b5686
parent0680cabd7c963586f732512eb622c85a68865233 (diff)
Fix a timeout bug in beinc_poller.py
-rwxr-xr-xbeinc_poller.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/beinc_poller.py b/beinc_poller.py
index b4e798f..cd1bd10 100755
--- a/beinc_poller.py
+++ b/beinc_poller.py
@@ -71,8 +71,14 @@ def display_notification(args, title, message):
71 raise Exception('There was a problem with libnotify\n') 71 raise Exception('There was a problem with libnotify\n')
72 notification_obj = pynotify.Notification(summary=title, 72 notification_obj = pynotify.Notification(summary=title,
73 message=message) 73 message=message)
74 notification_obj.timeout = 1000 * args.osd_timeout 74 if PY3:
75 notification_obj.set_category('im.received') 75 notification_obj.timeout = 1000 * args.osd_timeout
76 notification_obj.set_category('im.received')
77 else:
78 notification_obj.set_timeout(1000 * args.osd_timeout)
79 notification_obj.set_property(
80 'app_name',
81 '{0} {1}'.format(sys.argv[0], __version__))
76 notification_obj.show() 82 notification_obj.show()
77 else: 83 else:
78 raise Exception( 84 raise Exception(