Skip to content

Commit 9ea1cdf

Browse files
committed
Add error count to message
1 parent 35cc5e4 commit 9ea1cdf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/fosslight_source/_parsing_scancode_file_item.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ def get_error_from_header(header_item):
105105
for header in header_item:
106106
if key_error in header:
107107
errors = header[key_error]
108-
if len(errors) > 0:
108+
error_cnt = len(errors)
109+
if error_cnt > 0:
109110
has_error = True
110-
str_error = str(errors[0])
111+
str_error ='{}...({})'.format(errors[0], error_cnt)
111112
break
112113
except Exception as ex:
113114
logger.debug("error_parsing_header:"+str(ex))

0 commit comments

Comments
 (0)