Skip to content

Commit b9ef72f

Browse files
authored
Merge pull request DanBeard#6 from mkelliher/de6964
DE6964: Specify encoding when reading cve files
2 parents dd7fc4a + cd1d640 commit b9ef72f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cve_lookup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ def parse_dbs(folder):
2323
root = dict()
2424
header_printed = False
2525
for filename in glob.glob(folder + '/*.json'):
26-
with open(filename) as ff:
27-
cve_dict = json.loads(ff.read())
26+
with open(filename, encoding='utf-8') as ff:
27+
cve_dict = json.load(ff)
28+
2829
print("Processing file " + filename)
2930

3031
if header_printed == False:

0 commit comments

Comments
 (0)