From 75b662534fd415d4df8f43cad64536d8923149c7 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Fri, 4 Feb 2011 10:29:13 +0100 Subject: [PATCH] fix osc my with obs 2.2 api --- osc/commandline.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 8dd09ad9..bb9937ed 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -5056,12 +5056,17 @@ Please submit there instead, or use --nodevelproject to force direct submission. if list_requests: # try api side search as supported since OBS 2.2 try: - u = makeurl(apiurl, ['request'], ['view=collection&user=%s' % quote_plus(user)]) - res = http_GET(u) + u = makeurl(apiurl, ['request'], { + 'view' : 'collection', + 'state': 'pending', + 'user' : user, + }) + f = http_GET(u) + root = ET.parse(f).getroot() requests = [] - for root in res['request'].findall('request'): + for node in root.findall('request'): r = Request() - r.read(root) + r.read(node) requests.append(r) for r in requests: print r.list_view(), '\n'