Merge pull request #8166 from scottbrown/bugfix-ansible-vault-read-password-does-not-close-file-handle

Fixing improperly closed file handle in ansible vault
This commit is contained in:
Michael DeHaan 2014-07-17 08:06:17 -04:00
commit bc194740c8

View file

@ -107,7 +107,7 @@ def get_opt(options, k, defval=""):
def _read_password(filename): def _read_password(filename):
f = open(filename, "rb") f = open(filename, "rb")
data = f.read() data = f.read()
f.close f.close()
data = data.strip() data = data.strip()
return data return data