do not print a traceback if the configured application does not exists

This commit is contained in:
Yann Leboulanger 2005-03-22 10:13:32 +00:00
parent e5fc17210b
commit 7793eb2c98
1 changed files with 7 additions and 4 deletions

View File

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