[game-data-packager] 01/01: use yaml.CSafeLoader, as discussed on #debian-qa
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Mon Nov 9 15:31:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
detiste-guest pushed a commit to branch master
in repository game-data-packager.
commit 2bb66fcaaf2990edf5dfa463e1d3da88565c043d
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Mon Nov 9 16:30:30 2015 +0100
use yaml.CSafeLoader, as discussed on #debian-qa
---
game_data_packager/__init__.py | 2 +-
tools/bash_completion.py | 2 +-
tools/yaml2json.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 46312cc..43149b5 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -1272,7 +1272,7 @@ def load_game(progress, games, filename, content):
g = g[:len(g) - 5]
if filename.endswith('.yaml'):
- data = yaml.load(content, Loader=yaml.CLoader)
+ data = yaml.load(content, Loader=yaml.CSafeLoader)
else:
data = json.loads(content)
diff --git a/tools/bash_completion.py b/tools/bash_completion.py
index 3bfea9e..e5257bd 100755
--- a/tools/bash_completion.py
+++ b/tools/bash_completion.py
@@ -25,7 +25,7 @@ import glob
for yaml_file in sorted(glob.glob('data/*.yaml')):
print(os.path.splitext(os.path.basename(yaml_file))[0])
with open(yaml_file, encoding='utf-8') as raw:
- #yaml_data = yaml.load(raw)
+ #yaml_data = yaml.load(raw, Loader=yaml.CSafeLoader)
#for key in sorted(yaml_data['packages'].keys()):
# print(key, end=' ')
diff --git a/tools/yaml2json.py b/tools/yaml2json.py
index a0efc88..aa136a5 100755
--- a/tools/yaml2json.py
+++ b/tools/yaml2json.py
@@ -22,7 +22,7 @@ import sys
import yaml
def main(f, out):
- data = yaml.load(open(f, encoding='utf-8'), Loader=yaml.CLoader)
+ data = yaml.load(open(f, encoding='utf-8'), Loader=yaml.CSafeLoader)
game = f[5:].split('.')[0]
with open('data/wikipedia.csv', 'r', encoding='utf8') as csv:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list