Skip to content

Commit 6fc5af2

Browse files
committed
Bug fix related to license duplication
1 parent 6e563a7 commit 6fc5af2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/fosslight_source/_scan_item.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ def licenses(self, value):
7171
if value:
7272
max_length_exceed = False
7373
for new_lic in value:
74+
if len(new_lic) > MAX_LICENSE_LENGTH:
75+
new_lic = new_lic[:MAX_LICENSE_LENGTH]
76+
max_length_exceed = True
7477
if new_lic not in self._licenses:
75-
if len(new_lic) > MAX_LICENSE_LENGTH:
76-
new_lic = new_lic[:MAX_LICENSE_LENGTH]
77-
max_length_exceed = True
7878
self._licenses.append(new_lic)
7979
if len(",".join(self._licenses)) > MAX_LICENSE_TOTAL_LENGTH:
8080
self._licenses.remove(new_lic)

0 commit comments

Comments
 (0)