summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W <baddaemon87@gmail.com>2020-02-02 13:04:39 +0100
committerMichael W <baddaemon87@gmail.com>2020-03-22 17:57:42 +0100
commit6633d756a2c22575ab38e693866d32a201eb6015 (patch)
tree58c5250baad62d610b9c16d5194af0292a893364
parentd92961a923f078f9446adda8191c320e0856c50c (diff)
downloadcm_crowdin-6633d756a2c22575ab38e693866d32a201eb6015.tar.gz
cm_crowdin-6633d756a2c22575ab38e693866d32a201eb6015.tar.bz2
cm_crowdin-6633d756a2c22575ab38e693866d32a201eb6015.zip
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
-rwxr-xr-xcrowdin_sync.py2
1 files changed, 1 insertions, 1 deletions
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 @@ def add_target_paths(config_files, repo, base_path, project_path):
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']