mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
fix possible IndexError (#33750)
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
parent
7cd73ef4a7
commit
bd27e64cd8
1 changed files with 1 additions and 1 deletions
|
@ -470,7 +470,7 @@ def validate_dependency_licenses():
|
||||||
error_fields = error['fields']
|
error_fields = error['fields']
|
||||||
if error['type'] == 'summary':
|
if error['type'] == 'summary':
|
||||||
num_license_errors = error_fields['licenses']['errors']
|
num_license_errors = error_fields['licenses']['errors']
|
||||||
elif 'graphs' in error_fields:
|
elif 'graphs' in error_fields and error_fields['graphs']:
|
||||||
crate = error_fields['graphs'][0]['Krate']
|
crate = error_fields['graphs'][0]['Krate']
|
||||||
license_name = error_fields['notes'][0]
|
license_name = error_fields['notes'][0]
|
||||||
message = f'Rejected license "{license_name}". Run `cargo deny` for more details'
|
message = f'Rejected license "{license_name}". Run `cargo deny` for more details'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue