Merge pull request #432 from mwhudson/yaml-warnings

use yaml.safe_load instead of yaml.load
This commit is contained in:
Michael Hudson-Doyle 2019-03-26 23:07:58 +13:00 committed by GitHub
commit d827325fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ fi
python -c '
import os, sys, yaml
with open("new_installer/var/lib/snapd/seed/seed.yaml") as fp:
old_seed = yaml.load(fp)
old_seed = yaml.safe_load(fp)
new_snaps = []
subiquity_snap = {

View File

@ -444,7 +444,7 @@ class SnapListView(BaseView):
def get_preinstalled_snaps(self):
try:
seed = yaml.load(self.get_seed_yaml())
seed = yaml.safe_load(self.get_seed_yaml())
except yaml.YAMLError:
log.debug("failed to parse seed.yaml")
return set()