From 0b0f1c999304ae61ecad430aad5e0397a2810f0b Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Tue, 16 May 2017 20:00:22 +0200 Subject: Fix a timeout bug in beinc_poller.py --- beinc_poller.py | 10 ++++++++-- 1 file 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): raise Exception('There was a problem with libnotify\n') notification_obj = pynotify.Notification(summary=title, message=message) - notification_obj.timeout = 1000 * args.osd_timeout - notification_obj.set_category('im.received') + if PY3: + notification_obj.timeout = 1000 * args.osd_timeout + notification_obj.set_category('im.received') + else: + notification_obj.set_timeout(1000 * args.osd_timeout) + notification_obj.set_property( + 'app_name', + '{0} {1}'.format(sys.argv[0], __version__)) notification_obj.show() else: raise Exception( -- cgit v1.3