summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_debug.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2019-10-24 20:02:15 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-10-24 20:02:15 +0000
commit5bec6b0e2a2ce5fd03bb04f441536fc130e67997 (patch)
treed4fbc5ae8d7360ff87c283c2550f4661ef007dff /cloudinit/config/cc_debug.py
parent3e2482e8aa6630ca9bc115dc1f82d44d3fde1681 (diff)
downloadvyos-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/config/cc_debug.py')
-rw-r--r--cloudinit/config/cc_debug.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/config/cc_debug.py b/cloudinit/config/cc_debug.py
index 0a039eb3..610dbc8b 100644
--- a/cloudinit/config/cc_debug.py
+++ b/cloudinit/config/cc_debug.py
@@ -33,6 +33,7 @@ from six import StringIO
from cloudinit import type_utils
from cloudinit import util
+from cloudinit import safeyaml
SKIP_KEYS = frozenset(['log_cfgs'])
@@ -49,7 +50,7 @@ def _make_header(text):
def _dumps(obj):
- text = util.yaml_dumps(obj, explicit_start=False, explicit_end=False)
+ text = safeyaml.dumps(obj, explicit_start=False, explicit_end=False)
return text.rstrip()