From fff37fe869bcef4cca0ca2f8c42acb34cbbf484b Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Thu, 15 Jun 2006 09:43:08 +0000 Subject: [PATCH] check if pid file is already removed --- src/gajim.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index 2a85da404..c9da401ec 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -145,12 +145,16 @@ if profile: pid_filename += '.pid' import dialogs if os.path.exists(pid_filename): + path_to_file = os.path.join(gajim.DATA_DIR, 'pixmaps/gajim.png') + pix = gtk.gdk.pixbuf_new_from_file(path_to_file) + gtk.window_set_default_icon(pix) # set the icon to all newly opened wind pritext = _('Gajim is already running') sectext = _('Another instance of Gajim seems to be running\nRun anyway?') dialog = dialogs.YesNoDialog(pritext, sectext) if dialog.get_response() != gtk.RESPONSE_YES: sys.exit(3) - os.remove(pid_filename) + if os.path.exists(pid_filename): + os.remove(pid_filename) dialog.destroy() # Create pif file @@ -169,7 +173,6 @@ parser = optparser.OptionsParser(config_filename) import roster_window import systray -import dialogs import vcard import config