aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGae24 <96017547+Gae24@users.noreply.github.com>2024-10-10 11:49:24 +0200
committerGitHub <noreply@github.com>2024-10-10 09:49:24 +0000
commitbd27e64cd846c72db90937c7e0fafa64712ec5df (patch)
treef327929324ceb4952f921fd963d8a83c7f24d085
parent7cd73ef4a7634b3e8f716451681b708d1dcc6acb (diff)
downloadservo-bd27e64cd846c72db90937c7e0fafa64712ec5df.tar.gz
servo-bd27e64cd846c72db90937c7e0fafa64712ec5df.zip
fix possible IndexError (#33750)
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
-rw-r--r--python/tidy/tidy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/tidy/tidy.py b/python/tidy/tidy.py
index 88e92b80922..247e74a8713 100644
--- a/python/tidy/tidy.py
+++ b/python/tidy/tidy.py
@@ -470,7 +470,7 @@ def validate_dependency_licenses():
error_fields = error['fields']
if error['type'] == 'summary':
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']
license_name = error_fields['notes'][0]
message = f'Rejected license "{license_name}". Run `cargo deny` for more details'