From ed26c8fa77025d791dc1fa470fef58edc465fbb8 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 23 Jun 2005 23:25:20 +0000 Subject: [PATCH] remove spawnvp {leaves zombies} and use os.system [since windows now use registry] --- src/gajim.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index 902b9ed99..9251fbad6 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -125,7 +125,7 @@ GTKGUI_GLADE = 'gtkgui.glade' class Interface: - def launch_browser_mailer(self, kind, url): + def launch_browser_mailer(self, kind, uri): #kind = 'url' or 'mail' if os.name == 'nt': try: @@ -134,27 +134,19 @@ class Interface: pass return if gajim.config.get('openwith') == 'gnome-open': - app = 'gnome-open' - args = ['gnome-open'] - args.append(url) + command = 'gnome-open' elif gajim.config.get('openwith') == 'kfmclient exec': - app = 'kfmclient' - args = ['kfmclient', 'exec'] + command = 'kfmclient exec' elif gajim.config.get('openwith') == 'custom': if kind == 'url': - conf = gajim.config.get('custombrowser') + command = gajim.config.get('custombrowser') if kind == 'mail': - conf = gajim.config.get('custommailapp') - if conf == '': # if no app is configured + command = gajim.config.get('custommailapp') + if command == '': # if no app is configured return - args = conf.split() - app = args[0] - args.append(url) + command = command + ' ' + uri try: - if os.name == 'posix': - os.spawnvp(os.P_NOWAIT, app, args) - else: - os.spawnv(os.P_NOWAIT, app, args) + os.system(command) except: pass