diff options
author | Scott Moser <smoser@brickies.net> | 2019-10-24 20:02:15 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2019-10-24 20:02:15 +0000 |
commit | 5bec6b0e2a2ce5fd03bb04f441536fc130e67997 (patch) | |
tree | d4fbc5ae8d7360ff87c283c2550f4661ef007dff /cloudinit/handlers | |
parent | 3e2482e8aa6630ca9bc115dc1f82d44d3fde1681 (diff) | |
download | vyos-cloud-init-5bec6b0e2a2ce5fd03bb04f441536fc130e67997.tar.gz vyos-cloud-init-5bec6b0e2a2ce5fd03bb04f441536fc130e67997.zip |
Fix usages of yaml, and move yaml_dump to safeyaml.dumps.
Here we replace uses of the pyyaml module directly with functions
provided by cloudinit.safeyaml. Also, change/move
cloudinit.util.yaml_dumps
to
cloudinit.safeyaml.dumps
LP: #1849640
Diffstat (limited to 'cloudinit/handlers')
-rw-r--r-- | cloudinit/handlers/cloud_config.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/handlers/cloud_config.py b/cloudinit/handlers/cloud_config.py index 99bf0e61..2a307364 100644 --- a/cloudinit/handlers/cloud_config.py +++ b/cloudinit/handlers/cloud_config.py @@ -14,6 +14,7 @@ from cloudinit import handlers from cloudinit import log as logging from cloudinit import mergers from cloudinit import util +from cloudinit import safeyaml from cloudinit.settings import (PER_ALWAYS) @@ -75,7 +76,7 @@ class CloudConfigPartHandler(handlers.Handler): '', ] lines.extend(file_lines) - lines.append(util.yaml_dumps(self.cloud_buf)) + lines.append(safeyaml.dumps(self.cloud_buf)) else: lines = [] util.write_file(self.cloud_fn, "\n".join(lines), 0o600) |