Permalink
Browse files

rm timed_process

  • Loading branch information...
tony committed Oct 6, 2013
1 parent 08ad70c commit 67dbb793e7c830dee1c2a3235b468bae3af8157e
Showing with 7 additions and 86 deletions.
  1. +0 −70 pullv/timed_subprocess.py
  2. +7 −16 pullv/util.py

This file was deleted.

Oops, something went wrong.
@@ -12,11 +12,9 @@
import subprocess
import os
import logging
import fnmatch
logger = logging.getLogger(__name__)
from . import timed_subprocess
def expand_config(config):
'''Expand configuration into full form.
@@ -111,24 +109,17 @@ def _run(cmd,
}
try:
proc = timed_subprocess.TimedProc(cmd, **kwargs)
proc = subprocess.Popen(cmd, **kwargs)
except (OSError, IOError) as exc:
raise Error('Unable to urn command: {0}'.format(exc))
raise Error('Unable to run command: {0}'.format(exc))
try:
proc.wait(timeout)
except timed_subprocess.TimedProcTimeoutError as exc:
ret['stdout'] = str(exc)
ret['stderr'] = ''
ret['pid'] = proc.process.pid
ret['retcode'] = 1
return ret
proc.wait()
out, err = proc.stdout, proc.stderr
out, err = proc.stdout.read(), proc.stderr.read()
ret['stdout'] = out
ret['stderr'] = err
ret['pid'] = proc.process.pid
ret['retcode'] = proc.process.returncode
ret['pid'] = proc.pid
ret['retcode'] = proc.returncode
return ret

0 comments on commit 67dbb79

Please sign in to comment.