Skip to content

Commit a492b4c

Browse files
committed
fix: update dataexplorer to work with py3
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
1 parent 4eff559 commit a492b4c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

_scripts/dataexplorer.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
import codecs
2+
import json
3+
import os
14
import re
25
import markdown
3-
import os
4-
import sys
56
import yaml
6-
import json
7-
import codecs
87

98
IGNORED_FILES = ["index.md", "accessing-rql/event_emitter.md"]
109

@@ -118,7 +117,7 @@ def add_io_field(file_name, result):
118117
if is_yaml == True:
119118
yaml_raw += line
120119

121-
yaml_data = yaml.load(yaml_raw)
120+
yaml_data = yaml.load(yaml_raw, Loader=yaml.Loader)
122121
if "io" in yaml_data:
123122
result[yaml_data["permalink"]]["io"] = yaml_data["io"]
124123
else:
@@ -131,7 +130,7 @@ def browse_files(base, result):
131130
for path, dirs, files in os.walk(base):
132131
rel = path[len(base)+1:]
133132
for item in files:
134-
print os.path.join(rel, item)
133+
print(os.path.join(rel, item))
135134
if os.path.join(rel, item) not in IGNORED_FILES:
136135
add_io_field(os.path.join(path, item), result)
137136

0 commit comments

Comments
 (0)