Skip to content

Commit

Permalink
Migrate core.show_devel_project() to obs_api.Package
Browse files Browse the repository at this point in the history
  • Loading branch information
dmach committed Feb 12, 2024
1 parent 3d2a0f2 commit 82619b2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions osc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 3870 in osc/core.py

View check run for this annotation

Codecov / codecov/patch

osc/core.py#L3867-L3870

Added lines #L3867 - L3870 were not covered by tests


def set_devel_project(apiurl, prj, pac, devprj=None, devpac=None, print_to="debug"):
Expand Down

0 comments on commit 82619b2

Please sign in to comment.