retry
retry copied to clipboard
retry generator
I have a generator:
def push(client, image_tag):
image, tag = image_tag
extra = {'event': 'push', 'image': image}
for evt in client.push(image, tag, stream=True):
d = compat.json_loads(evt)
d.update(extra)
yield d
And if I get a socket error while iterating from the socket, I'd like to retry a few times.
This seems to be related to https://github.com/invl/retry/issues/23
👍