From 8f92b8b9f3aa878e53e6d0d96fdac659cf7a3de2 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Jan 04 2019 22:54:27 +0000 Subject: fix typeInfo handling in list_archives --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 3aab02f..bc9f70c 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -4157,8 +4157,10 @@ def list_archives(buildID=None, buildrootID=None, componentBuildrootID=None, hos val = typeInfo[key] if not isinstance(val, (list, tuple)): val = [val] - for v in val: - clauses.append(r"""%s ~ E'\\m%s\\M'""" % (key, v)) + for i, v in enumerate(val): + pkey = '%s_pattern_%i' % (key, i) + values[pkey] = r'\m%s\M' % v + clauses.append('%s ~ %%(%s)s' % (key, pkey)) elif type == 'image': joins.append('image_archives ON archiveinfo.id = image_archives.archive_id') fields.append(['image_archives.arch', 'arch'])