From cc7df5c213579d9ecf3d8b5417cadb7f78c39595 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Sat, 26 Aug 2023 20:12:40 +0200 Subject: [PATCH] archive: Handle Lintian tags not having a description on package import Resolves: #31 --- src/laniakea/archive/pkgimport.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/laniakea/archive/pkgimport.py b/src/laniakea/archive/pkgimport.py index 20bba4ca..c1d41b12 100644 --- a/src/laniakea/archive/pkgimport.py +++ b/src/laniakea/archive/pkgimport.py @@ -1289,7 +1289,9 @@ def _import_trusted_changes( if not lint_success: lintian_lines = [] for tag in lintian_tags: - lintian_lines.append('{}: {}: {}'.format(tag['level'], tag['tag'], tag['description'])) + lintian_lines.append( + '{}: {}: {}'.format(tag['level'], tag['tag'], tag.get('description', 'No description')) + ) raise UploadError( ('Unable to process upload {}: Lintian issues were found, please resolve them.\n{}').format( changes.filename, '\n'.join(lintian_lines)