ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: AMBARI-16731. Should close file object in security.py. (Masahiro Tanaka via swagle)
Date Tue, 28 Jun 2016 02:47:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 560d2d7f2 -> 6c7e39a24


AMBARI-16731. Should close file object in security.py. (Masahiro Tanaka via swagle)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6c7e39a2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6c7e39a2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6c7e39a2

Branch: refs/heads/trunk
Commit: 6c7e39a240c01f35788c9fd8f7037e05e971811a
Parents: 560d2d7
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Mon Jun 27 19:47:44 2016 -0700
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Mon Jun 27 19:47:44 2016 -0700

----------------------------------------------------------------------
 ambari-agent/src/main/python/ambari_agent/security.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6c7e39a2/ambari-agent/src/main/python/ambari_agent/security.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/security.py b/ambari-agent/src/main/python/ambari_agent/security.py
index 779b85c..72ae954 100644
--- a/ambari-agent/src/main/python/ambari_agent/security.py
+++ b/ambari-agent/src/main/python/ambari_agent/security.py
@@ -214,12 +214,14 @@ class CertificateManager():
     stream.close()
     srvr_crt_f = open(self.getSrvrCrtName(), 'w+')
     srvr_crt_f.write(response)
+    srvr_crt_f.close()
 
   def reqSignCrt(self):
     sign_crt_req_url = self.server_url + '/certs/' + hostname.hostname(
       self.config)
     agent_crt_req_f = open(self.getAgentCrtReqName())
     agent_crt_req_content = agent_crt_req_f.read()
+    agent_crt_req_f.close()
     passphrase_env_var = self.config.get('security', 'passphrase_env_var_name')
     passphrase = os.environ[passphrase_env_var]
     register_data = {'csr': agent_crt_req_content,


Mime
View raw message