Remove TOML warning on emit (#48385)

This commit is contained in:
Matt Martz 2018-11-08 20:07:42 -06:00 committed by Jordan Borean
parent 7db2861961
commit b908a348a6

View file

@ -129,11 +129,9 @@ if HAS_TOML and hasattr(toml, 'TomlEncoder'):
AnsibleSequence: self.dump_funcs.get(list),
AnsibleUnicode: self.dump_funcs.get(str),
})
display.warning(WARNING_MSG)
toml_dumps = partial(toml.dumps, encoder=AnsibleTomlEncoder())
else:
def toml_dumps(data):
display.warning(WARNING_MSG)
return toml.dumps(convert_yaml_objects_to_native(data))