Merge "Print JSON-compatible booleans"
This commit is contained in:
commit
9d70d50ff3
|
@ -110,7 +110,7 @@ def print_key(
|
|||
raise exc.ConfigException(
|
||||
'key %s does not exist in %s' % (key, config_path))
|
||||
value_types.ensure_type(str(config), type_name)
|
||||
if isinstance(config, (dict, list)):
|
||||
if isinstance(config, (dict, list, bool)):
|
||||
print(json.dumps(config))
|
||||
else:
|
||||
print(str(config))
|
||||
|
|
|
@ -137,7 +137,7 @@ class TestRunOSConfigApplier(testtools.TestCase):
|
|||
['os-apply-config.py', '--metadata', self.path, '--key',
|
||||
'y', '--type', 'raw']))
|
||||
self.stdout.seek(0)
|
||||
self.assertEqual(str(CONFIG['y']),
|
||||
self.assertEqual("false",
|
||||
self.stdout.read().strip())
|
||||
self.assertEqual('', self.logger.output)
|
||||
|
||||
|
|
Loading…
Reference in New Issue