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 d45f75b commit b7fa38eCopy full SHA for b7fa38e
cyclonedx/parser/environment.py
@@ -63,9 +63,10 @@ def __init__(self):
63
if 'License' in i_metadata.keys() and i_metadata.get('License') != 'UNKNOWN':
64
c.set_license(license_str=i_metadata.get('License'))
65
66
- for classifier in i_metadata.get_all('Classifier'):
67
- if str(classifier).startswith('License :: OSI Approved :: '):
68
- c.set_license(license_str=str(classifier).replace('License :: OSI Approved :: ', '').strip())
+ if 'Classifier' in i_metadata.keys():
+ for classifier in i_metadata.get_all('Classifier'):
+ if str(classifier).startswith('License :: OSI Approved :: '):
69
+ c.set_license(license_str=str(classifier).replace('License :: OSI Approved :: ', '').strip())
70
71
self._components.append(c)
72
0 commit comments