Upgrade Hacking version

Change-Id: Ib2fc7e0d8e27de2fef341e313e29904502158aa4
Closes-Bug: #1458450
This commit is contained in:
Sirushti Murugesan 2015-05-25 11:35:02 +05:30 committed by Thomas Herve
parent 6cfcb51650
commit 576b235af0
3 changed files with 4 additions and 4 deletions

View File

@ -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'))

View File

@ -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)))

View File

@ -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))