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 12
12
import subprocess
13
13
import os
14
14
import logging
15
+ import fnmatch
15
16
logger = logging .getLogger (__name__ )
16
17
17
- from . import timed_subprocess
18
-
19
-
20
18
def expand_config (config ):
21
19
'''Expand configuration into full form.
22
20
@@ -111,24 +109,17 @@ def _run(cmd,
111
109
}
112
110
113
111
try :
114
- proc = timed_subprocess . TimedProc (cmd , ** kwargs )
112
+ proc = subprocess . Popen (cmd , ** kwargs )
115
113
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 ))
117
115
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 ()
126
117
127
- out , err = proc .stdout , proc .stderr
118
+ out , err = proc .stdout . read () , proc .stderr . read ()
128
119
129
120
ret ['stdout' ] = out
130
121
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
133
124
134
125
return ret
You can’t perform that action at this time.
0 commit comments