diff options
Diffstat (limited to 'beinc_server.py')
| -rwxr-xr-x | beinc_server.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/beinc_server.py b/beinc_server.py index 3d9ff35..284f657 100755 --- a/beinc_server.py +++ b/beinc_server.py | |||
| @@ -125,9 +125,16 @@ class BEINCInstance(object): | |||
| 125 | sys.exit(errno.EPERM) | 125 | sys.exit(errno.EPERM) |
| 126 | try: | 126 | try: |
| 127 | self.__osd_notification = pynotify.Notification(' ') | 127 | self.__osd_notification = pynotify.Notification(' ') |
| 128 | self.__osd_notification.timeout = 1000 * int(instance_dict.get( | 128 | if PY3: |
| 129 | 'osd_timeout', 5)) | 129 | self.__osd_notification.timeout = 1000 * int( |
| 130 | self.__osd_notification.set_category('im.received') | 130 | instance_dict.get('osd_timeout', 5)) |
| 131 | self.__osd_notification.set_category('im.received') | ||
| 132 | else: | ||
| 133 | self.__osd_notification.set_timeout( | ||
| 134 | 1000 * int(instance_dict.get('osd_timeout', 5))) | ||
| 135 | self.__osd_notification.set_property( | ||
| 136 | 'app_name', | ||
| 137 | '{0} {1}'.format(sys.argv[0], __version__)) | ||
| 131 | self.__osd_type = BEINC_OSD_TYPE_PYNOTIFY | 138 | self.__osd_type = BEINC_OSD_TYPE_PYNOTIFY |
| 132 | except Exception as e: | 139 | except Exception as e: |
| 133 | sys.stderr.write( | 140 | sys.stderr.write( |
