X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/952458464e04ff17e2c8fc0ce89812912e09737c..aece35d20c892aa7b3df29b15ac0a8a167b0b3ab:/sdk/cwl/arvados_cwl/fsaccess.py diff --git a/sdk/cwl/arvados_cwl/fsaccess.py b/sdk/cwl/arvados_cwl/fsaccess.py index 5c09e671fa..a5e9db0cfe 100644 --- a/sdk/cwl/arvados_cwl/fsaccess.py +++ b/sdk/cwl/arvados_cwl/fsaccess.py @@ -16,8 +16,9 @@ import re import logging import threading from collections import OrderedDict +from io import StringIO -import ruamel.yaml as yaml +import ruamel.yaml import cwltool.stdfsaccess from cwltool.pathmapper import abspath @@ -235,9 +236,12 @@ class CollectionFetcher(DefaultFetcher): return f.read() if url.startswith("arvwf:"): record = self.api_client.workflows().get(uuid=url[6:]).execute(num_retries=self.num_retries) - definition = yaml.round_trip_load(record["definition"]) + yaml = ruamel.yaml.YAML(typ='rt', pure=True) + definition = yaml.load(record["definition"]) definition["label"] = record["name"] - return yaml.round_trip_dump(definition) + stream = StringIO() + yaml.dump(definition, stream) + return stream.getvalue() return super(CollectionFetcher, self).fetch_text(url) def check_exists(self, url):