def get_blobs(pid,limit=None): count = 0 for target in client.list_targets(pid): count += 1 if limit is not None and count > limit: return blob = target+'_blob.png' print 'fetching %s...' % blob yield client.fetch_image(blob)
def fetch_assignment(self,pid): bin = self.fetch_header(pid) bin['images'] = [dict(pid=i, image=i+'.jpg') for i in client.list_targets(pid)] return bin