mloesch / sickle

Sickle: OAI-PMH for Humans
Other
106 stars 42 forks source link

do not return None from harvest #39

Closed miku closed 4 years ago

miku commented 4 years ago

It can happen, that harvest returns None, e.g. when an endpoint returns 503 Service Unavailable repeatedly.

However, there is an assumption that response will not be None during iteration:

self.oai_response = self.sickle.harvest(**params)
error = self.oai_response.xml.find(

This yields an 'NoneType' object has no attribute 'xml' error.

Hence, when max_retries is exceeded, a TimeoutError would be a bit more clear.

mloesch commented 4 years ago

has been fixed with #41

mloesch commented 4 years ago

fixed in release 0.7.0