Commit 615689e4 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update InvenioStore.interogate to return requests.Response.

parent b877ecf6
......@@ -284,7 +284,7 @@ class InvenioStore(object):
timeout for the HTTP request
Returns:
str: the HTTP response
requests.Response:
Raises:
RequestException:
......@@ -296,8 +296,7 @@ class InvenioStore(object):
r = self._session.get(url, timeout=timeout, params=params)
r.raise_for_status()
r.encoding = "utf-8"
return r.text
return r
def get_ids(self, **kwargs):
"""Return a list of *record id* matching search criteria.
......@@ -408,7 +407,7 @@ class InvenioStore(object):
# check that the list of identifier is well form
# [1291068, 1352722, 1376692] or [1493820] or []
if len(filter(lambda x: not isinstance(x, int), li)) > 0:
if len(list(filter(lambda x: not isinstance(x, int), li))) > 0:
raise CdsException(MSG_NO_IDS)
ids.extend(li)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment