INNER CODE UNIT · Python
_handle_continuations
siznax/wptools · wptools/core.py:120
def _handle_continuations(self, response, cache_key):
"""
Select continue params and clear cache or last continue params
"""
rcontinue = response.get('continue')
listen = ['blcontinue', 'cmcontinue', 'plcontinue']
cparams = {}
if rcontinue:
for flag in listen:
if rcontinue.get(flag):
cparams[flag] = rcontinue.get(flag)
if cparams:
self.data['continue'] = cparams
del self.cache[cache_key]
else: # no more continuations
if 'continue' in self.data: