1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-07 05:38:43 +02:00

- fix search OBS api call /search/project_id should /search/project/id (bnc#769948)

This commit is contained in:
2012-11-06 09:16:13 +01:00
parent 1fe51dc482
commit a45c602614

View File

@@ -5644,7 +5644,9 @@ def search(apiurl, **kwargs):
"""
res = {}
for urlpath, xpath in kwargs.iteritems():
u = makeurl(apiurl, ['search', urlpath], ['match=%s' % quote_plus(xpath)])
path = [ 'search' ]
path += urlpath.split('_') # FIXME: take underscores as path seperators. I see no other way atm to fix OBS api calls and not breaking osc api
u = makeurl(apiurl, path, ['match=%s' % quote_plus(xpath)])
f = http_GET(u)
res[urlpath] = ET.parse(f).getroot()
return res