mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-23 05:26:16 +01:00
fix osc my with obs 2.2 api
This commit is contained in:
parent
ba3bed8ecc
commit
75b662534f
@ -5056,12 +5056,17 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
if list_requests:
|
if list_requests:
|
||||||
# try api side search as supported since OBS 2.2
|
# try api side search as supported since OBS 2.2
|
||||||
try:
|
try:
|
||||||
u = makeurl(apiurl, ['request'], ['view=collection&user=%s' % quote_plus(user)])
|
u = makeurl(apiurl, ['request'], {
|
||||||
res = http_GET(u)
|
'view' : 'collection',
|
||||||
|
'state': 'pending',
|
||||||
|
'user' : user,
|
||||||
|
})
|
||||||
|
f = http_GET(u)
|
||||||
|
root = ET.parse(f).getroot()
|
||||||
requests = []
|
requests = []
|
||||||
for root in res['request'].findall('request'):
|
for node in root.findall('request'):
|
||||||
r = Request()
|
r = Request()
|
||||||
r.read(root)
|
r.read(node)
|
||||||
requests.append(r)
|
requests.append(r)
|
||||||
for r in requests:
|
for r in requests:
|
||||||
print r.list_view(), '\n'
|
print r.list_view(), '\n'
|
||||||
|
Loading…
Reference in New Issue
Block a user