summaryrefslogtreecommitdiff
path: root/src/buildstream
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-06-21 09:21:02 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-06-25 10:43:38 +0000
commite4412977d8404a2a820c4c1c366604ab6cdc6427 (patch)
tree44f6f00edd358b42c8bd81ce4e835db9b93c2bd3 /src/buildstream
parent6fb773257a715a2380d3c69b8047a672b23d9c82 (diff)
downloadbuildstream-e4412977d8404a2a820c4c1c366604ab6cdc6427.tar.gz
_yaml: Remove useless calls to '_yaml.node_sanitize'
Calling '_yaml.dump' will itself call '_yaml.node_sanitize', therefore we can remove all calls to it in places where we directly after call dump.
Diffstat (limited to 'src/buildstream')
-rw-r--r--src/buildstream/_artifact.py2
-rw-r--r--src/buildstream/testing/runcli.py1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/buildstream/_artifact.py b/src/buildstream/_artifact.py
index 90d25b4fe..ec80e6417 100644
--- a/src/buildstream/_artifact.py
+++ b/src/buildstream/_artifact.py
@@ -149,7 +149,7 @@ class Artifact():
# Store public data
with tempfile.NamedTemporaryFile(dir=self._tmpdir) as tmp:
- _yaml.dump(_yaml.node_sanitize(publicdata), tmp.name)
+ _yaml.dump(publicdata, tmp.name)
public_data_digest = self._cas.add_object(path=tmp.name, link_directly=True)
artifact.public_data.CopyFrom(public_data_digest)
size += public_data_digest.size_bytes
diff --git a/src/buildstream/testing/runcli.py b/src/buildstream/testing/runcli.py
index 9efff4593..a77deeb9e 100644
--- a/src/buildstream/testing/runcli.py
+++ b/src/buildstream/testing/runcli.py
@@ -576,7 +576,6 @@ class CliIntegration(Cli):
_yaml.composite_dict(base_config, project_config)
- base_config = _yaml.node_sanitize(base_config)
_yaml.dump(base_config, project_filename)
else: