debug_args = self.args
cmd = interpolate("{} {}".format(self.interpreter, debug_args), "${ }", {"filename": debug_script_file, "script": self.script})
raise RuntimeError("Failed to execute script (ret={}).\nPlease use command\n\t``{}``\nunder "{}" to test it."
.format(ret, " \\\n\t ".join(cmd.split()), os.getcwd()))
except RuntimeError:
raise
except Exception as e:
After Change
p = subprocess.Popen(cmd, shell=True, stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL)
ret = p.wait()
if ret != 0:
task_id = os.path.basename(env.sos_dict["__std_err__"]).split(".")[0]
raise RuntimeError("Use "sos status {} -v4" for details.".format(task_id))
else:
p = subprocess.Popen(cmd, shell=True,
stderr=None if env.verbosity > 0 else subprocess.DEVNULL,