From 7793eb2c98be89d852608680358875fb458ccd7a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Tue, 22 Mar 2005 10:13:32 +0000 Subject: [PATCH] do not print a traceback if the configured application does not exists --- plugins/gtkgui/gtkgui.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index e285c17079..686db430f2 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -256,10 +256,13 @@ class plugin: args = conf.split() app = args[0] args.append(url) - if os.name == 'posix': - os.spawnvp(os.P_NOWAIT, app, args) - else: - os.spawnv(os.P_NOWAIT, app, args) + try: + if os.name == 'posix': + os.spawnvp(os.P_NOWAIT, app, args) + else: + os.spawnv(os.P_NOWAIT, app, args) + except: + pass def play_timeout(self, pid): pidp, r = os.waitpid(pid, os.WNOHANG) -- GitLab