commit | 94131ba8bf5c544fd84607870a47ab2a69631439 | [log] [tgz] |
---|---|---|
author | Jenkins <jenkins@review.openstack.org> | Fri Jul 17 04:48:30 2015 +0000 |
committer | Gerrit Code Review <review@openstack.org> | Fri Jul 17 04:48:30 2015 +0000 |
tree | 5a3de459098416730560fe60c728a23f864fd996 | |
parent | 384923ec3330d91cd0dbfae6708102eb4549b223 [diff] | |
parent | 2a346986e4bcbf26db930967ca80a201fb3fb126 [diff] |
Merge "Ensure we close the file accounts file after reading"
diff --git a/tempest/common/accounts.py b/tempest/common/accounts.py index 650faf1..78e0e72 100644 --- a/tempest/common/accounts.py +++ b/tempest/common/accounts.py
@@ -31,8 +31,8 @@ def read_accounts_yaml(path): - yaml_file = open(path, 'r') - accounts = yaml.load(yaml_file) + with open(path, 'r') as yaml_file: + accounts = yaml.load(yaml_file) return accounts