From baf746afb8e19fac4a44b381472c6e96691d07d6 Mon Sep 17 00:00:00 2001 From: confi-surya Date: Wed, 19 Dec 2018 17:18:11 +0530 Subject: [PATCH] dict_object.keys() is not required for *in* operator cleanup of .keys() from dict_object.keys() *in* operator Change-Id: I38c2a0086f55661d2426b42721c406ad58ea9c58 --- heat-config-docker-compose/install.d/hook-docker-compose.py | 2 +- heat-config-json-file/install.d/hook-json-file.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/heat-config-docker-compose/install.d/hook-docker-compose.py b/heat-config-docker-compose/install.d/hook-docker-compose.py index f73332e..a73ec27 100755 --- a/heat-config-docker-compose/install.d/hook-docker-compose.py +++ b/heat-config-docker-compose/install.d/hook-docker-compose.py @@ -98,7 +98,7 @@ def main(argv=sys.argv): for i in ast.literal_eval(input_values.get('env_files'))) for file in compose_env_files: - if file in input_env_files.keys(): + if file in input_env_files: write_input_file(file, input_env_files.get(file)) cmd = [ diff --git a/heat-config-json-file/install.d/hook-json-file.py b/heat-config-json-file/install.d/hook-json-file.py index 84c13f8..a029135 100755 --- a/heat-config-json-file/install.d/hook-json-file.py +++ b/heat-config-json-file/install.d/hook-json-file.py @@ -34,7 +34,7 @@ def main(argv=sys.argv): c = json.load(sys.stdin)['config'] - for fname in c.keys(): + for fname in c: prepare_dir(os.path.dirname(fname)) data = c.get(fname) with open(fname, 'w') as json_data_file: