This commit is contained in:
Mike McLean 2016-08-20 16:44:41 -04:00
parent ea84af67ce
commit 0cef35e50a
3 changed files with 6 additions and 6 deletions

View file

@ -3659,7 +3659,7 @@ def get_build_type(buildInfo, strict=False):
ret = {}
extra = binfo['extra'] or {}
for btype in query.execute():
for (btype,) in query.execute():
ret[btype] = extra.get('typeinfo', {}).get('btype')
#deal with legacy types
@ -3791,8 +3791,8 @@ def list_archives(buildID=None, buildrootID=None, componentBuildrootID=None, hos
clauses.append('checksum = %(checksum)s')
values['checksum'] = checksum
if archiveID is not None:
clauses.append('archive_id = %(archive_id)s')
values['id'] = archiveID
clauses.append('archiveinfo.id = %(archive_id)s')
values['archive_id'] = archiveID
if type is None:
pass
@ -3882,7 +3882,7 @@ def get_archive(archive_id, strict=False):
data = list_archives(archiveID=archive_id)
if not data:
if strict:
raise koji.GenericError('No such archive: %s' % archiveID=archive_id)
raise koji.GenericError('No such archive: %s' % archive_id)
else:
return None

View file

@ -160,7 +160,7 @@
</td>
</tr>
#for btype in $archiveIndex
#archivesByExt = $archiveIndex[btype]
#set $archivesByExt = $archiveIndex[btype]
#if not $archivesByExt
#continue
#end if

View file

@ -1118,7 +1118,7 @@ def buildinfo(environ, buildID):
archive['dl_url'] = '/'.join([pathinfo.imagebuild(build), archive['filename']])
else:
archive['display'] = archive['filename']
archive['dl_url'] = '/'.join([pathinfo.buildfiles(build), archive['filename']])
archive['dl_url'] = '/'.join([pathinfo.typedir(build, btype), archive['filename']])
ext = os.path.splitext(archive['filename'])[1][1:]
idx.setdefault(ext, []).append(archive)