File tree Expand file tree Collapse file tree 2 files changed +7
-86
lines changed
Expand file tree Collapse file tree 2 files changed +7
-86
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1212import subprocess
1313import os
1414import logging
15+ import fnmatch
1516logger = logging .getLogger (__name__ )
1617
17- from . import timed_subprocess
18-
19-
2018def 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
You can’t perform that action at this time.
0 commit comments