Merge pull request #331 from teamorchard/use-pyyaml-safe-load

Update to use pyyaml safe_load()
This commit is contained in:
Patrick Kanzler 2019-06-04 22:45:05 +02:00 committed by GitHub
commit 19e3ec6895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ Dmytro Katyukha
Gerard Marull-Paretas Gerard Marull-Paretas
Hark Hark
Joel Lehtonen Joel Lehtonen
Justin Vieira
kennedy kennedy
Kristi Kristi
ldos ldos

View File

@ -38,7 +38,7 @@ else:
if full_load: if full_load:
logger.debug('Loading and pickling capabilities') logger.debug('Loading and pickling capabilities')
with open(capabilities_path) as cp, open(pickle_path, 'wb') as pp: with open(capabilities_path) as cp, open(pickle_path, 'wb') as pp:
CAPABILITIES = yaml.load(cp) CAPABILITIES = yaml.safe_load(cp)
pickle.dump(CAPABILITIES, pp, protocol=2) pickle.dump(CAPABILITIES, pp, protocol=2)
logger.debug('Finished loading capabilities took %.2fs', time.time() - t0) logger.debug('Finished loading capabilities took %.2fs', time.time() - t0)