From eb638ed9adc8c90c9265ff048efabb5d0cee015b Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Feb 23 2021 12:15:13 +0000 Subject: PR#2692: adding check for the license header key Merges #2692 https://pagure.io/koji/pull-request/2692 Fixes: #2628 https://pagure.io/koji/issue/2628 cli: rpminfo errors if build is deleted --- diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index bcca6ea..d571577 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -3179,7 +3179,8 @@ def anon_handle_rpminfo(goptions, session, args): if not info.get('external_repo_id', 0): headers = session.getRPMHeaders(rpmID=info['id'], headers=["license"]) - print("License: %(license)s" % headers) + if 'license' in headers: + print("License: %(license)s" % headers) print("Build ID: %(build_id)s" % info) if info['buildroot_id'] is None: print("No buildroot data available")