From 5d8331cd494f4d360a73c4e7d8f8556abc616d96 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Mon, 14 Jan 2013 09:12:34 -0500 Subject: [PATCH] fix get_image_archive and web archiveinfo handler for non-images --- hub/kojihub.py | 2 ++ www/kojiweb/archiveinfo.chtml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hub/kojihub.py b/hub/kojihub.py index af72d981..003e1fc8 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -3789,6 +3789,8 @@ def get_image_archive(archive_id, strict=False): select = """SELECT %s FROM image_archives WHERE archive_id = %%(archive_id)i""" % ', '.join(fields) results = _singleRow(select, locals(), fields, strict=strict) + if not results: + return None results['rootid'] = False fields = ('image_id', 'rpm_id') select = """SELECT %s FROM image_listing diff --git a/www/kojiweb/archiveinfo.chtml b/www/kojiweb/archiveinfo.chtml index 8abc4e38..ffda9cff 100644 --- a/www/kojiweb/archiveinfo.chtml +++ b/www/kojiweb/archiveinfo.chtml @@ -137,7 +137,7 @@ #end if - #if $archive.rootid + #if 'rootid' in $archive and $archive.rootid Installed RPMs