Don't crash when failing to manually launch an application
This commit is contained in:
parent
62bee525c8
commit
9e8c4d9a22
@ -24,9 +24,13 @@ def Execute( cmd , commandCwd=None):
|
||||
if isinstance( cmd, str ) or isinstance( cmd, unicode):
|
||||
if (cmd.find("/home/") >= 0) or (cmd.find("su-to-root") >= 0) or (cmd.find("\"") >= 0):
|
||||
print "running manually..."
|
||||
os.chdir(cwd)
|
||||
os.system(cmd + " &")
|
||||
return True
|
||||
try:
|
||||
os.chdir(cwd)
|
||||
os.system(cmd + " &")
|
||||
return True
|
||||
except Exception, detail:
|
||||
print detail
|
||||
return False
|
||||
cmd = cmd.split()
|
||||
cmd = RemoveArgs(cmd)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user