Skip to content

Commit

Permalink
use string plugin to enable dump_to_str-
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Dec 18, 2023
1 parent 8f74315 commit c3bc41e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions constructor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit c3bc41e

Please sign in to comment.