check_source: fix condition checking for <scmsync> for git packaging

This commit is contained in:
Dan Čermák 2023-06-27 20:52:34 +02:00
parent 8db5f6242c
commit 90c7ad546c
No known key found for this signature in database
GPG Key ID: 96B29BCAD2AE5A44

View File

@ -159,9 +159,9 @@ class CheckSource(ReviewBot.ReviewBot):
meta = ET.fromstringlist(show_package_meta(self.apiurl, devel_project, devel_package)) meta = ET.fromstringlist(show_package_meta(self.apiurl, devel_project, devel_package))
scm_sync = meta.find('scmsync') scm_sync = meta.find('scmsync')
if ( if (
not scm_sync or (scm_sync is None) or
( (
scm_sync and (scm_sync is not None) and
not scm_sync.text.startswith(f"https://src.opensuse.org/pool/{source_package}") not scm_sync.text.startswith(f"https://src.opensuse.org/pool/{source_package}")
and all(not source_project.startswith(allowed_src) for allowed_src in self.allowed_scm_submission_sources) and all(not source_project.startswith(allowed_src) for allowed_src in self.allowed_scm_submission_sources)
) )