Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 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
Example #4
0
 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
Example #5
0
 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
Example #6
0
 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
Example #7
0
 def run(self, cmd, retcode=None):
     return run_proc(self.popen(cmd), retcode)
Example #8
0
 def run(self, cmd, retcode=None):
     return run_proc(self.popen(cmd), retcode)
Example #9
0
 def run(self, proc):
     return run_proc(proc, self.retcode, self.timeout)