cli: fix KeyError for external RPM in rpminfo command
This commit is contained in:
parent
2a505f5981
commit
567f9393d2
1 changed files with 3 additions and 2 deletions
|
|
@ -3024,9 +3024,10 @@ def anon_handle_rpminfo(goptions, session, args):
|
|||
print("Built: %s" % time.strftime('%a, %d %b %Y %H:%M:%S %Z', time.localtime(info['buildtime'])))
|
||||
print("SIGMD5: %(payloadhash)s" % info)
|
||||
print("Size: %(size)s" % info)
|
||||
headers = session.getRPMHeaders(rpmID=info['id'], headers=["license"])
|
||||
print("License: %(license)s" % headers)
|
||||
if not info.get('external_repo_id', 0):
|
||||
headers = session.getRPMHeaders(rpmID=info['id'],
|
||||
headers=["license"])
|
||||
print("License: %(license)s" % headers)
|
||||
print("Build ID: %(build_id)s" % info)
|
||||
if info['buildroot_id'] is None:
|
||||
print("No buildroot data available")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue