Change `yaml.load` to `yaml.safe_load` and refactor into a util.
Both benchmarks/ and scmperf_lib/ make use of PyYAML to load yaml files. This library has used an unsafe (i.e. can load yaml bombs, etc.) loader by default since its inception and has been urging people to move to `safe_load` instead. We could have still used `load` by switching to SafeLoader, but the refactor shrunk the code so much that it would not really be an improvement.
Showing
- benchmarks/utils.py 4 additions, 6 deletionsbenchmarks/utils.py
- create_skip_file.py 2 additions, 6 deletionscreate_skip_file.py
- create_stripped_cached_repos.py 3 additions, 6 deletionscreate_stripped_cached_repos.py
- lib/scmperf_lib/__init__.py 1 addition, 1 deletionlib/scmperf_lib/__init__.py
- repo-scripts/make-partial-repos 0 additions, 1 deletionrepo-scripts/make-partial-repos
- repo-scripts/make-reference 2 additions, 2 deletionsrepo-scripts/make-reference
- repo-scripts/update-benchrepo 1 addition, 2 deletionsrepo-scripts/update-benchrepo
Loading
Please register or sign in to comment