Skip to content
Snippets Groups Projects
Commit 5a061188 authored by Jakub Ružička's avatar Jakub Ružička
Browse files

pkgstyle: use Distro.match in template selection

This reuses common code as well as allows for overriding template
matching in adistro.Distro child classes.
parent 18f2c1cb
No related branches found
No related tags found
1 merge request!178Allow matching on ID_LIKE from /etc/os-release
Pipeline #134217 passed
......@@ -40,7 +40,7 @@ def get_pkgstyle_for_template(path):
def get_pkgstyle_for_distro(distro):
for style in PKGSTYLES.values():
for sup_distro in style.SUPPORTED_DISTROS:
if sup_distro in distro.names:
if distro.match(sup_distro):
return style
return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment