Fix garbage being printed when exporting as YAML - related #7795

This resolves issue #7795, by passing the `encoding` keyword argument
only when the code is run on a Python 2 interpreter.

related #7795.
This commit is contained in:
Rigel Di Scala 2020-08-03 17:40:17 +02:00 committed by Ryan Petrello
parent def79de72b
commit 490746fe8c
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -130,7 +130,6 @@ def format_yaml(output, fmt):
return yaml.safe_dump(
output,
default_flow_style=False,
encoding='utf-8',
allow_unicode=True
)