mirror of
https://github.com/sudoxnym/fdroiddata.git
synced 2026-04-14 19:46:54 +00:00
tools/: use safe yaml loading
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
This commit is contained in:
parent
34bf48aac3
commit
7c98192b77
2 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ os.chdir(os.path.dirname(__file__) + '/../')
|
|||
for f in glob.glob('metadata/*.yml'):
|
||||
with open(f) as fp:
|
||||
raw = fp.read()
|
||||
data = yaml.load(raw)
|
||||
data = yaml.safe_load(raw)
|
||||
archive_policy = data.get('ArchivePolicy')
|
||||
if (
|
||||
'Disabled' not in data
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ else:
|
|||
pattern = re.compile(r'Repo: .*')
|
||||
for f in files:
|
||||
with open(f) as fp:
|
||||
data = yaml.load(fp)
|
||||
data = yaml.safe_load(fp)
|
||||
repo_url = None
|
||||
if 'Repo' in data:
|
||||
repo_url = data['Repo'].strip().rstrip('/')
|
||||
|
|
|
|||
Loading…
Reference in a new issue