actually fixing unselect
This commit is contained in:
parent
3f4ea8bf8a
commit
947006135f
@ -20,6 +20,7 @@ sys.path.append(_plugin_dir)
|
||||
from osclib.stagingapi import StagingAPI
|
||||
from osclib.request_finder import RequestFinder
|
||||
from osclib.select_command import SelectCommand
|
||||
from osclib.unselect_command import UnselectCommand
|
||||
from osclib.accept_command import AcceptCommand
|
||||
from osclib.cleanup_rings import CleanupRings
|
||||
from osclib.list_command import ListCommand
|
||||
|
@ -219,13 +219,12 @@ class RequestFinder(object):
|
||||
return finder.srs
|
||||
|
||||
@classmethod
|
||||
def find_staged_sr(cls, pkgs, apiurl, stagingapi):
|
||||
def find_staged_sr(cls, pkgs, stagingapi):
|
||||
"""
|
||||
Search for all various mutations and return a single SR#s.
|
||||
:param pkgs: mesh of argumets to search for (SR#|package name)
|
||||
:param apiurl: OBS url
|
||||
:param stagingapi: StagingAPI instance
|
||||
"""
|
||||
finder = cls(apiurl, stagingapi)
|
||||
finder = cls(stagingapi.apiurl, stagingapi)
|
||||
finder.find_via_stagingapi(pkgs)
|
||||
return finder.srs
|
||||
|
@ -14,7 +14,7 @@ class UnselectCommand(object):
|
||||
Remove request from staging project
|
||||
:param packages: packages/requests to delete from staging projects
|
||||
"""
|
||||
for request, request_project in RequestFinder.find_staged_sr(packages, opts.apiurl, api).items():
|
||||
for request, request_project in RequestFinder.find_staged_sr(packages, self.api).items():
|
||||
staging_project = request_project['staging']
|
||||
print('Unselecting "{}" from "{}"'.format(request, staging_project))
|
||||
self.api.rm_from_prj(staging_project, request_id=request)
|
||||
|
Loading…
x
Reference in New Issue
Block a user