def wait(self): """Waits for the process to terminate; will raise a :class:`plumbum.commands.ProcessExecutionError` in case of failure""" if self._returncode is not None: return self._returncode, self._stdout, self._stderr = run_proc( self.proc, self._expected_retcode, self._timeout)
def wait(self): """Waits for the process to terminate; will raise a :class:`plumbum.commands.ProcessExecutionError` in case of failure""" if self._returncode is not None: return self._returncode, self._stdout, self._stderr = run_proc(self.proc, self._expected_retcode, self._timeout)
def runner(): if was_run[0]: return # already done was_run[0] = True try: return run_proc(p, retcode, timeout) finally: for f in [p.stdin, p.stdout, p.stderr]: try: f.close() except Exception: pass
def runner(): if was_run[0]: return # already done was_run[0] = True try: return run_proc(p, retcode, timeout) finally: del p.run # to break cyclic reference p -> cell -> p for f in [p.stdin, p.stdout, p.stderr]: try: f.close() except Exception: pass
def run(self, cmd, retcode=None): return run_proc(self.popen(cmd), retcode)
def run(self, proc): return run_proc(proc, self.retcode, self.timeout)