From d437ef497a0570e809e2e7f2a47ffbc61ac4b5b0 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 18 Aug 2005 12:50:33 +0000 Subject: [PATCH] try to catch an exception --- src/systraywin32.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/systraywin32.py b/src/systraywin32.py index 7ccd7e93d..de6a250f6 100644 --- a/src/systraywin32.py +++ b/src/systraywin32.py @@ -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 \ No newline at end of file + return imgs