Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Commit

Permalink
resumption_token fix, indentation fix in poll_profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey Rosolovskiy authored and Aleksey Rosolovskiy committed Mar 21, 2013
1 parent 2d6d36b commit 540f3d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/oai.py
Expand Up @@ -174,7 +174,6 @@ def list_records(self, set="", resumption_token="", metadataPrefix=""):
resumption_token = U(doc.OAI_PMH.ListRecords.resumptionToken)
else:
resumption_token = ''
resumption_token = ''
return {'records' : records, 'resumption_token' : resumption_token}

#
Expand Down
6 changes: 3 additions & 3 deletions scripts/poll_profiles
Expand Up @@ -88,14 +88,14 @@ def process_primo_all(profile, blacklist=None):
request_more = False

endpoint_content = ARC_PARSE(content)
total_hits = endpoint_content['SEGMENTS']['JAGROOT']['RESULT']['DOCSET']['TOTALHITS']
print >> sys.stderr, "%s of %s total documents" % (index, total_hits)
total_hits = endpoint_content['SEGMENTS']['JAGROOT']['RESULT']['DOCSET']['TOTALHITS']
print >> sys.stderr, "%s of %s total documents" % (index, total_hits)
items = endpoint_content['SEGMENTS']['JAGROOT']['RESULT']['DOCSET']['DOC']

for item in (items if isinstance(items, list) else [items]):
item['_id'] = item['PrimoNMBib']['record']['control']['recordid']
collection['items'].append(item)
index += 1
index += 1
enrich_coll(profile, collection['name'], json.dumps({'items':collection['items']}))

if int(index) == int(total_hits):
Expand Down

0 comments on commit 540f3d0

Please sign in to comment.