crowdin: PyYAML yaml.load(input) deprecation
* YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated,
as the default Loader is unsafe.
Please read https://msg.pyyaml.org/load for full details
* Use yaml.safe_load(input) instead - we only use a small subset of YAML
so this works as expected
* Test: Compared the results of yaml.load() and yaml.safe_load()
Change-Id: I8dc2006ac8e15f8d86cc75ae0d7853d032d60f54
diff --git a/crowdin_sync.py b/crowdin_sync.py
index d3de7a8..7111033 100755
--- a/crowdin_sync.py
+++ b/crowdin_sync.py
@@ -68,7 +68,7 @@
for f in config_files:
fh = open(f, "r")
try:
- config = yaml.load(fh)
+ config = yaml.safe_load(fh)
for tf in config['files']:
if project_path in tf['source']:
target_path = tf['translation']