def get_result(self, rs):
        etags = []
        key = name = None
        newsource = None
        if rs is not None:
            try:
                while True:
                    key = rs.next(self.conn.timeout())
                    getLogger().debug("got key {} with etag: {}".format(
                        key.name, key.etag))
                    etags.append(key.etag)
            except __HOLE__:
                pass
            except WorkerFailureError:
                getLogger().debug("error getting result.", exc_info=True)

        if not etags:
            raise UploadEmptyError()

        if hasattr(self.upload, 'complete_upload'):
            try:
                key = self.conn.complete_multipart(self.upload, etags)
            except Exception as e:
                getLogger().debug("error completing multipart", exc_info=True)
                raise CloudProviderUploadError(e)
            name = key.key_name
        else:
            name = key.name

        uploaded = len(etags)
        total = self.source.chunks
        getLogger().debug("Uploaded {} out of {} chunks".format(
            uploaded, total))
        size = self.source.size
        if uploaded < total:
            for seq in xrange(uploaded, total):
                make_progress({'part': seq, 'tx': 0})
            skip = self.source.chunkstart(uploaded)
            newsource = ChunkedFile(
                self.source.path, skip=skip, chunk=self.source.chunk)
            size = size - newsource.size
        getLogger().debug("saving progress for {}".format(key))
        save_progress(name, size)
        return (key.etag, newsource)
dataset/ETHPy150Open longaccess/longaccess-client/lacli/pool.py/MPUpload.get_result