You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running Tern with Scancode, Tern tries to parse Scancode's
`declared_license` dictionary `license` key to determine the package
license. Sometimes this key is called `License` and sometimes the
`declared_license` dictionary is empty, however. In each of the
aforementioned cases Tern fails and throws a `KeyError`. This commit
fixes the error by checking for an empty dictionary before trying to
extract the license value and also checks for the `License` key in
addition to the `license` key.
Note that an issue[1] has been opened in the scancode repository asking
for clarity on whether the declared_license key should be `License` or
`license`. If any resolution comes from the scancode issue that has
been opened, it may make sense to revert parts of this change.
[1] aboutcode-org/scancode-toolkit#2803Resolves#1063
Signed-off-by: Rose Judge <[email protected]>
0 commit comments