コード例 #1
0
ファイル: modifiers.py プロジェクト: McLutzifer/Python
 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)
コード例 #2
0
ファイル: modifiers.py プロジェクト: RyanBallantyne/plumbum
 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)
コード例 #3
0
ファイル: base.py プロジェクト: kchiu/plumbum
 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
コード例 #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
コード例 #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
コード例 #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
コード例 #7
0
 def run(self, cmd, retcode=None):
     return run_proc(self.popen(cmd), retcode)
コード例 #8
0
ファイル: parallel.py プロジェクト: AinuX/plumbum
 def run(self, cmd, retcode=None):
     return run_proc(self.popen(cmd), retcode)
コード例 #9
0
 def run(self, proc):
     return run_proc(proc, self.retcode, self.timeout)