From 82619b2de2cda325bb37ef817a6fe636f55c9c9e Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Mon, 12 Feb 2024 15:13:09 +0100 Subject: [PATCH] Migrate core.show_devel_project() to obs_api.Package --- osc/core.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/osc/core.py b/osc/core.py index 321623dd9e..bfa76f0534 100644 --- a/osc/core.py +++ b/osc/core.py @@ -3864,12 +3864,10 @@ def show_scmsync(apiurl, prj, pac=None): def show_devel_project(apiurl, prj, pac): - m = show_package_meta(apiurl, prj, pac) - node = ET.fromstring(b''.join(m)).find('devel') - if node is None: - return None, None - else: - return node.get('project'), node.get('package', None) + package_obj = obs_api.Package.from_api(apiurl, prj, pac) + if package_obj.devel is None: + return None, None + return package_obj.devel.project, package_obj.devel.package def set_devel_project(apiurl, prj, pac, devprj=None, devpac=None, print_to="debug"):