commit | 620384cda19a8ac90e41055f9f8063d3dfa0fcc8 | [log] [tgz] |
---|---|---|
author | Jenkins <jenkins@review.openstack.org> | Wed Dec 02 14:30:33 2015 +0000 |
committer | Gerrit Code Review <review@openstack.org> | Wed Dec 02 14:30:33 2015 +0000 |
tree | 249dbb5295d56a2f7476fae0eba18ed7b72588a7 | |
parent | edfefab83e55cb9fe3ae210e27309f54cf0379c4 [diff] | |
parent | 6be90cc08dc955b39ce8f8bd9b127be1efe52666 [diff] |
Merge "Optimize "open" method with context manager"
diff --git a/neutron/tests/tempest/common/accounts.py b/neutron/tests/tempest/common/accounts.py index 1a50e3c..6440739 100644 --- a/neutron/tests/tempest/common/accounts.py +++ b/neutron/tests/tempest/common/accounts.py
@@ -28,8 +28,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