diff options
Diffstat (limited to 'git_command.py')
-rw-r--r-- | git_command.py | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/git_command.py b/git_command.py index d1e0c971..aecda0e4 100644 --- a/git_command.py +++ b/git_command.py | |||
@@ -221,26 +221,10 @@ class GitCommand(object): | |||
221 | self.stdin = p.stdin | 221 | self.stdin = p.stdin |
222 | 222 | ||
223 | def Wait(self): | 223 | def Wait(self): |
224 | p = self.process | ||
225 | |||
226 | if p.stdin: | ||
227 | p.stdin.close() | ||
228 | self.stdin = None | ||
229 | |||
230 | if p.stdout: | ||
231 | self.stdout = p.stdout.read() | ||
232 | p.stdout.close() | ||
233 | else: | ||
234 | p.stdout = None | ||
235 | |||
236 | if p.stderr: | ||
237 | self.stderr = p.stderr.read() | ||
238 | p.stderr.close() | ||
239 | else: | ||
240 | p.stderr = None | ||
241 | |||
242 | try: | 224 | try: |
243 | rc = p.wait() | 225 | p = self.process |
226 | (self.stdout, self.stderr) = p.communicate() | ||
227 | rc = p.returncode | ||
244 | finally: | 228 | finally: |
245 | _remove_ssh_client(p) | 229 | _remove_ssh_client(p) |
246 | return rc | 230 | return rc |