1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-14 00:06:15 +01:00

Migrate core.show_scmsync() to obs_api.{Package,Project}

This commit is contained in:
Daniel Mach 2024-02-13 15:51:26 +01:00
parent af24f3c75a
commit d017a490a0

View File

@ -3853,15 +3853,14 @@ def download_assets(directory):
def show_scmsync(apiurl, prj, pac=None):
from . import obs_api
if pac:
m = show_package_meta(apiurl, prj, pac)
else:
m = show_project_meta(apiurl, prj)
node = ET.fromstring(b''.join(m)).find('scmsync')
if node is None:
return None
else:
return node.text
package_obj = obs_api.Package.from_api(apiurl, prj, pac)
return package_obj.scmsync
project_obj = obs_api.Project.from_api(apiurl, prj)
return project_obj.scmsync
def show_devel_project(apiurl, prj, pac):