Skip to content

Commit 99715db

Browse files
committed
scripts/python/app/NUT-Monitor-py2gtk2.in: handle lack of pynotify more gracefully [#3509]
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent e0c4920 commit 99715db

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/python/app/NUT-Monitor-py2gtk2.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,8 @@ class interface :
730730
# Try to init pynotify
731731
try :
732732
import pynotify
733-
pynotify.init( "NUT Monitor" )
733+
if not pynotify.init( "NUT Monitor" ):
734+
return
734735

735736
if ( icon_file != "" ) :
736737
icon = "file://%s" % os.path.abspath( os.path.join( self.__resdir, "pixmaps", icon_file ) )

0 commit comments

Comments
 (0)