try to catch an exception

This commit is contained in:
Nikos Kouremenos 2005-08-18 12:50:33 +00:00
parent f702a3d4ba
commit d437ef497a
1 changed files with 5 additions and 2 deletions

View File

@ -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