Allow specifying a devel project that has "Factory" in its name

we should only expand with openSUSE in front if it is starting with
"Factory". Also add ALP handling and hide the warning if a full
project has been specified.
This commit is contained in:
Dirk Müller 2023-01-23 13:49:53 +01:00 committed by Dirk Müller
parent 394f8ee055
commit 16b851a502
No known key found for this signature in database

View File

@ -53,14 +53,15 @@ def _full_project_name(self, project):
if project.startswith(('openSUSE', 'SUSE')):
return project
if 'Factory' in project or 'openSUSE' in project:
if project.startswith('Factory'):
return 'openSUSE:%s' % project
if 'SLE' in project:
if project.startswith('SLE') or project.startswith('ALP'):
return 'SUSE:%s' % project
# If we can't guess, raise a Warning
warnings.warn('%s project not recognized.' % project)
if (':' not in project):
warnings.warn('%s project not recognized.' % project)
return project