Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/license_expression/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
The main entry point is the Licensing object.
"""

import gzip
import itertools
import json
import re
Expand Down Expand Up @@ -60,7 +61,7 @@
data_dir = join(curr_dir, 'data')
vendored_scancode_licensedb_index_location = join(
data_dir,
'scancode-licensedb-index.json',
'scancode-licensedb-index.json.gz',
)

# append new error codes to PARSE_ERRORS by monkey patching
Expand Down Expand Up @@ -830,7 +831,7 @@ def get_license_index(
The default value of `license_index_location` points to a vendored copy
of the license index from https://scancode-licensedb.aboutcode.org/
"""
with open(license_index_location) as f:
with gzip.open(license_index_location, "rt") as f:
return json.load(f)


Expand Down
Loading