diff --git a/hot/software-config/elements/heat-config-ansible/install.d/hook-ansible.py b/hot/software-config/elements/heat-config-ansible/install.d/hook-ansible.py index 972bd321..2a46c7f8 100755 --- a/hot/software-config/elements/heat-config-ansible/install.d/hook-ansible.py +++ b/hot/software-config/elements/heat-config-ansible/install.d/hook-ansible.py @@ -57,11 +57,11 @@ def main(argv=sys.argv): if not config_text: log.warn("No 'config' input found, nothing to do.") return - #Write 'variables' to file + # Write 'variables' to file with os.fdopen(os.open( vars_filename, os.O_CREAT | os.O_WRONLY, 0o600), 'w') as var_file: json.dump(variables, var_file) - #Write the executable, 'config', to file + # Write the executable, 'config', to file with os.fdopen(os.open(fn, os.O_CREAT | os.O_WRONLY, 0o600), 'w') as f: f.write(c.get('config', '').encode('utf-8')) diff --git a/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py b/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py index c43df4d2..da291f67 100755 --- a/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py +++ b/hot/software-config/elements/heat-config-docker-compose/install.d/hook-docker-compose.py @@ -77,7 +77,7 @@ def main(argv=sys.argv): json.dump(build_response(stdout, stderr, 0), sys.stdout) return - #convert config to dict + # convert config to dict if not isinstance(config, dict): config = ast.literal_eval(json.dumps(yaml.load(config))) diff --git a/test-requirements.txt b/test-requirements.txt index 1536cec8..75cbc9a9 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,7 +3,7 @@ discover dpath>=1.3.2 fixtures>=0.3.14 # Hacking already pins down pep8, pyflakes and flake8 -hacking>=0.8.0,<0.9 +hacking>=0.10.0,<0.11 mock>=1.0 requests>=1.2.1,!=2.4.0 requests-mock>=0.4.0 # Apache-2.0 diff --git a/tests/software_config/test_heat_config_kubelet.py b/tests/software_config/test_heat_config_kubelet.py index 8f16e47d..03d2eed9 100644 --- a/tests/software_config/test_heat_config_kubelet.py +++ b/tests/software_config/test_heat_config_kubelet.py @@ -142,6 +142,6 @@ class HeatConfigKubeletORCTest(common.RunScriptTest): manifest_path = self.manifests_dir.join(manifest_name) self.assertThat(manifest_path, matchers.FileExists()) - #manifest file should match manifest config + # manifest file should match manifest config self.assertEqual(config['config'], self.json_from_file(manifest_path))