Skip to content

Commit d04bb2a

Browse files
committed
Fixed #439
* Update code to use split instead of strip
1 parent cc5572c commit d04bb2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/attributecode/attrib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ def generate(abouts, template=None, variables=None):
7979
if not license_text_name in captured_license:
8080
captured_license.append(license_text_name)
8181
if license_text_name.endswith('.LICENSE'):
82-
license_key = license_text_name.strip('.LICENSE')
82+
# See https://github.com/nexB/aboutcode-toolkit/issues/439
83+
# for why using split instead of strip
84+
license_key = license_text_name.rsplit('.', 1)[0]
8385
else:
8486
license_key = license_text_name
8587
license_key_and_context[license_key] = about.license_file.value[license_text_name]

0 commit comments

Comments
 (0)