aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--scraps/js_data_refactor.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e77858b..5955b60 100644
--- a/Makefile
+++ b/Makefile
@@ -26,12 +26,12 @@ jade: $(HTML_FILES)
node_modules/.keep: package.yaml
- python -c "import yaml; print '\n'.join(yaml.load(open('$<'))['dependencies'].keys())" |\
+ python -c "import yaml; print '\n'.join(yaml.safe_load(open('$<'))['dependencies'].keys())" |\
while read n; do [ -d "node_modules/$$n" ] || npm install "$$n"; done
touch node_modules/.keep
package.json: package.yaml
- python -c "import yaml, json; json.dump(yaml.load(open('$<')), open('$@', 'wb'))"
+ python -c "import yaml, json; json.dump(yaml.safe_load(open('$<')), open('$@', 'wb'))"
.PHONY: coffee sass jade
diff --git a/scraps/js_data_refactor.py b/scraps/js_data_refactor.py
index 0739835..8896c9a 100644
--- a/scraps/js_data_refactor.py
+++ b/scraps/js_data_refactor.py
@@ -55,7 +55,7 @@ data = re.sub(r'(?<=projection: )(d3\..*)(?=\})', r"'\1'", data)
import yaml, operator as op
-data = yaml.load(data)
+data = yaml.safe_load(data)
data = sorted(data, key=op.itemgetter('name'))
data_tuple = op.itemgetter('name', 'projection')