mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
Merge pull request #872 from marcus-h/prjresults_name_filter_regex
RFC: Support a regex based name filtering in core.get_prj_results
This commit is contained in:
commit
a9138e54d5
@ -5949,6 +5949,9 @@ def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=Non
|
||||
f = show_prj_results_meta(apiurl, prj)
|
||||
root = ET.fromstring(b''.join(f))
|
||||
|
||||
if name_filter is not None:
|
||||
name_filter = re.compile(name_filter)
|
||||
|
||||
pacs = []
|
||||
# sequence of (repo,arch) tuples
|
||||
targets = []
|
||||
@ -6005,12 +6008,12 @@ def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=Non
|
||||
if not name_filter:
|
||||
pacs_to_show.append(pkg)
|
||||
targets_to_show.append(repo)
|
||||
elif name_filter in pkg:
|
||||
elif name_filter.search(pkg) is not None:
|
||||
pacs_to_show.append(pkg)
|
||||
#filtering for Package Name
|
||||
elif name_filter:
|
||||
for pkg in pacs:
|
||||
if name_filter in pkg:
|
||||
if name_filter.search(pkg) is not None:
|
||||
pacs_to_show.append(pkg)
|
||||
|
||||
#filter non building states
|
||||
|
Loading…
Reference in New Issue
Block a user