sorry, typo in this patch. See repost

On Tue, Sep 22, 2015 at 12:47 PM, Mike McLean <mikem@redhat.com> wrote:
---
 hub/kojihub.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/hub/kojihub.py b/hub/kojihub.py
index c6e28d7..6948e79 100644
--- a/hub/kojihub.py
+++ b/hub/kojihub.py
@@ -3504,12 +3504,18 @@ def list_rpms(buildID=None, buildrootID=None, imageID=None, componentBuildrootID
         else:
             raise koji.GenericError, 'invalid type for "arches" parameter: %s' % type(arches)

-    query = QueryProcessor(columns=[f[0] for f in fields], aliases=[f[1] for f in fields],
+    fields, aliases = zip(*fields)
+    query = QueryProcessor(columns=fields, aliases=aliases for f in fields],
                            tables=['rpminfo'], joins=joins, clauses=clauses,
                            values=locals(), opts=queryOpts)
     data = query.execute()
-    for row in data:
-        row['size'] = koji.encode_int(row['size'])
+    if not (queryOpts and queryOpts.get('countOnly')):
+        if queryOpts and 'asList' in queryOpts:
+            key = aliases.index('size')
+        else:
+            key = 'size'
+        for row in data:
+            row[key] = koji.encode_int(row[key])
     return data

 def get_maven_build(buildInfo, strict=False):
--
2.1.0

_______________________________________________
koji-devel mailing list
koji-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/koji-devel