We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6a3605 commit 9b3ee2cCopy full SHA for 9b3ee2c
addonmanager_licenses.py
@@ -40,7 +40,11 @@ def __init__(self):
40
self._load_license_data()
41
42
def _load_license_data(self):
43
- spdx_path = ":/licenses/spdx.json"
+ if not __file__:
44
+ raise RuntimeError(
45
+ "The SPDXLicenseManager must be run in an environment where __file__ is known"
46
+ )
47
+ spdx_path = f"{os.path.dirname(__file__)}/Resources/licenses/spdx.json"
48
if os.path.exists(spdx_path):
49
with open(spdx_path, "r", encoding="utf-8") as f:
50
string_data = f.read()
0 commit comments