dump using safeyaml

This commit is contained in:
Michael Hudson-Doyle 2020-03-26 12:44:00 +13:00
parent f0d6beba63
commit 0189965949
1 changed files with 5 additions and 2 deletions

View File

@ -20,10 +20,13 @@ import platform
import sys
import traceback
import urwid
import yaml
import apport.hookutils
from cloudinit import safeyaml
import yaml
from subiquitycore.async_helpers import (
run_in_thread,
schedule_task,
@ -157,7 +160,7 @@ class Subiquity(Application):
if 'autoinstall' in cfg:
atomic_helper.write_file(
self.opts.autoinstall,
yaml.dump(cfg['autoinstall']),
safeyaml.dumps(cfg['autoinstall']),
mode=0o600)
if os.path.exists(self.opts.autoinstall):
with open(self.opts.autoinstall) as fp: