Skip to content

Commit 67dbb79

Browse files
committed
rm timed_process
1 parent 08ad70c commit 67dbb79

File tree

2 files changed

+7
-86
lines changed

2 files changed

+7
-86
lines changed

pullv/timed_subprocess.py

Lines changed: 0 additions & 70 deletions
This file was deleted.

pullv/util.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
import subprocess
1313
import os
1414
import logging
15+
import fnmatch
1516
logger = logging.getLogger(__name__)
1617

17-
from . import timed_subprocess
18-
19-
2018
def expand_config(config):
2119
'''Expand configuration into full form.
2220
@@ -111,24 +109,17 @@ def _run(cmd,
111109
}
112110

113111
try:
114-
proc = timed_subprocess.TimedProc(cmd, **kwargs)
112+
proc = subprocess.Popen(cmd, **kwargs)
115113
except (OSError, IOError) as exc:
116-
raise Error('Unable to urn command: {0}'.format(exc))
114+
raise Error('Unable to run command: {0}'.format(exc))
117115

118-
try:
119-
proc.wait(timeout)
120-
except timed_subprocess.TimedProcTimeoutError as exc:
121-
ret['stdout'] = str(exc)
122-
ret['stderr'] = ''
123-
ret['pid'] = proc.process.pid
124-
ret['retcode'] = 1
125-
return ret
116+
proc.wait()
126117

127-
out, err = proc.stdout, proc.stderr
118+
out, err = proc.stdout.read(), proc.stderr.read()
128119

129120
ret['stdout'] = out
130121
ret['stderr'] = err
131-
ret['pid'] = proc.process.pid
132-
ret['retcode'] = proc.process.returncode
122+
ret['pid'] = proc.pid
123+
ret['retcode'] = proc.returncode
133124

134125
return ret

0 commit comments

Comments
 (0)