mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-14 16:26:13 +01:00
Migrate core.show_scmsync() to obs_api.{Package,Project}
This commit is contained in:
parent
af24f3c75a
commit
d017a490a0
15
osc/core.py
15
osc/core.py
@ -3853,15 +3853,14 @@ def download_assets(directory):
|
|||||||
|
|
||||||
|
|
||||||
def show_scmsync(apiurl, prj, pac=None):
|
def show_scmsync(apiurl, prj, pac=None):
|
||||||
|
from . import obs_api
|
||||||
|
|
||||||
if pac:
|
if pac:
|
||||||
m = show_package_meta(apiurl, prj, pac)
|
package_obj = obs_api.Package.from_api(apiurl, prj, pac)
|
||||||
else:
|
return package_obj.scmsync
|
||||||
m = show_project_meta(apiurl, prj)
|
|
||||||
node = ET.fromstring(b''.join(m)).find('scmsync')
|
project_obj = obs_api.Project.from_api(apiurl, prj)
|
||||||
if node is None:
|
return project_obj.scmsync
|
||||||
return None
|
|
||||||
else:
|
|
||||||
return node.text
|
|
||||||
|
|
||||||
|
|
||||||
def show_devel_project(apiurl, prj, pac):
|
def show_devel_project(apiurl, prj, pac):
|
||||||
|
Loading…
Reference in New Issue
Block a user