From 97ee57d5306b80ba6ab7cc3223fcfbedd80b2a4a Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Feb 16 2019 21:36:47 +0000 Subject: fix arches handling in listHosts --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 37bea7d..9b164df 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -10345,8 +10345,8 @@ class RootExports(object): # matching 'ppc64' if not (isinstance(arches, list) or isinstance(arches, tuple)): arches = [arches] - archClause = [r"""arches ~ E'\\m%s\\M'""" % arch for arch in arches] - clauses.append('(' + ' OR '.join(archClause) + ')') + archPattern = r'\m(%s)\M' % '|'.join(arches) + clauses.append('arches ~ %(archPattern)s') if channelID != None: joins.append('host_channels on host.id = host_channels.host_id') clauses.append('host_channels.channel_id = %(channelID)i')