mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-28 10:46:15 +01:00
- minor fix in get_submit_request_list()
This commit is contained in:
parent
5aaaa3572a
commit
f4e4c91376
@ -562,6 +562,22 @@ of the package %s primarily takes place.
|
||||
Please submit there instead, or use --nodevelproject to force direct submission.""" \
|
||||
% (devloc, dst_package)
|
||||
sys.exit(1)
|
||||
reqs = get_submit_request_list(apiurl, dst_project, dst_package)
|
||||
oreqs = []
|
||||
myreqs = []
|
||||
for req in reqs:
|
||||
if req.state.who == conf.get_apiurl_usr(apiurl):
|
||||
myreqs.append(req)
|
||||
else:
|
||||
oreqs.append(req)
|
||||
if len(myreqs) > 0:
|
||||
print 'You already created the following submitrequests: %s.' % \
|
||||
', '.join([str(i.reqid) for i in myreqs ])
|
||||
repl = raw_input('Revoke the old requests? (y/N) ')
|
||||
if repl == 'y':
|
||||
for req in myreqs:
|
||||
change_submit_request_state(apiurl, str(req.reqid), 'revoked',
|
||||
'obsoleted by request: %s' % req.reqid)
|
||||
|
||||
result = create_submit_request(apiurl,
|
||||
src_project, src_package,
|
||||
|
@ -1958,7 +1958,7 @@ def get_submit_request_list(apiurl, project, package, req_state=('new')):
|
||||
for root in collection.findall('request'):
|
||||
r = SubmitReq()
|
||||
r.read(root)
|
||||
if (r.state.name in req_state) or ('' in req_state):
|
||||
if (r.state.name in req_state) or not len(req_state):
|
||||
requests.append(r)
|
||||
|
||||
return requests
|
||||
|
Loading…
Reference in New Issue
Block a user