You need something like
```
                    if not resp:
                        logger.debug('!   %s returned 0 results this iteration, stopping' % name)
                        stopthepresses = True
```
to deal with the possibility of an empty response, otherwise the paginationservice keeps running for no reason.