Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
rm timed_process
  • Loading branch information
tony committed Oct 6, 2013
1 parent 08ad70c commit 67dbb79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 86 deletions.
70 changes: 0 additions & 70 deletions pullv/timed_subprocess.py

This file was deleted.

23 changes: 7 additions & 16 deletions pullv/util.py
Expand Up @@ -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.
Expand Down Expand Up @@ -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.