From c3bc41e771cbdb8e875a6c64eef24b2445d7d0a7 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 18 Dec 2023 19:38:44 +0100 Subject: [PATCH] use string plugin to enable dump_to_str- --- constructor/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/constructor/utils.py b/constructor/utils.py index a3bfe8145..73680ec1a 100644 --- a/constructor/utils.py +++ b/constructor/utils.py @@ -17,7 +17,7 @@ from ruamel.yaml import YAML logger = logging.getLogger(__name__) -yaml = YAML(typ="rt") +yaml = YAML(typ=["rt", "string"]) yaml.default_flow_style = False yaml.indent(mapping=2, sequence=4, offset=2) @@ -120,7 +120,7 @@ def add_condarc(info): if channel_alias: condarc['channel_alias'] = channel_alias if isinstance(condarc, dict): - condarc = yaml.dump(condarc) + condarc = yaml.dump_to_string(condarc) yield '# ----- add condarc' if info['_platform'].startswith('win'): yield 'Var /Global CONDARC'