try to catch an exception
This commit is contained in:
parent
f702a3d4ba
commit
d437ef497a
|
@ -176,7 +176,10 @@ class NotifyIcon:
|
|||
|
||||
def remove(self):
|
||||
""" Removes the tray icon. """
|
||||
win32gui.Shell_NotifyIcon(win32gui.NIM_DELETE, self._get_nid())
|
||||
try:
|
||||
win32gui.Shell_NotifyIcon(win32gui.NIM_DELETE, self._get_nid())
|
||||
except: # maybe except just pywintypes.error ? anyways..
|
||||
pass
|
||||
|
||||
|
||||
def set_tooltip(self, tooltip):
|
||||
|
@ -319,4 +322,4 @@ class SystrayWin32(systray.Systray):
|
|||
0, 0, img_flags)
|
||||
imgs[state] = image
|
||||
|
||||
return imgs
|
||||
return imgs
|
||||
|
|
Loading…
Reference in New Issue