diff options
author | Michael DeHaan <michael.dehaan@gmail.com> | 2012-02-24 04:10:34 +0100 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2012-02-24 04:10:34 +0100 |
commit | 7ce5db97ed8fd5233b0fd7e93c34e1c3da1788f6 (patch) | |
tree | c3f79a4234feab9514866362068c56cb61eb85ae /lib | |
parent | use readlines on stdout so we'll block on long running commands (diff) | |
download | ansible-7ce5db97ed8fd5233b0fd7e93c34e1c3da1788f6.tar.xz ansible-7ce5db97ed8fd5233b0fd7e93c34e1c3da1788f6.zip |
Add explicit calls to close connections
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/ansible/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ansible/__init__.py b/lib/ansible/__init__.py index 37d6d38e51..d5c0b95c73 100755 --- a/lib/ansible/__init__.py +++ b/lib/ansible/__init__.py @@ -127,12 +127,14 @@ class Runner(object): self._exec_command(conn, "chmod +x %s" % outpath) cmd = self._command(outpath) result = self._exec_command(conn, cmd) + conn.close() return [ host, True, json.loads(result) ] else: # SFTP file copy module is not really a module ftp = conn.open_sftp() ftp.put(self.module_args[0], self.module_args[1]) ftp.close() + conn.close() return [ host, True, 1 ] |