Wraps data with the interrupt reader and the file chunk reader. :type data: bytes :param data: The data to wrap. :type callbacks: list :param callbacks: The callbacks associated with the transfer future. :type close_callbacks: list :param c
(self, data, callbacks, close_callbacks)
| 485 | return data |
| 486 | |
| 487 | def _wrap_data(self, data, callbacks, close_callbacks): |
| 488 | """ |
| 489 | Wraps data with the interrupt reader and the file chunk reader. |
| 490 | |
| 491 | :type data: bytes |
| 492 | :param data: The data to wrap. |
| 493 | |
| 494 | :type callbacks: list |
| 495 | :param callbacks: The callbacks associated with the transfer future. |
| 496 | |
| 497 | :type close_callbacks: list |
| 498 | :param close_callbacks: The callbacks to be called when closing the |
| 499 | wrapper for the data. |
| 500 | |
| 501 | :return: Fully wrapped data. |
| 502 | """ |
| 503 | fileobj = self._wrap_fileobj(BytesIO(data)) |
| 504 | return self._osutil.open_file_chunk_reader_from_fileobj( |
| 505 | fileobj=fileobj, |
| 506 | chunk_size=len(data), |
| 507 | full_file_size=len(data), |
| 508 | callbacks=callbacks, |
| 509 | close_callbacks=close_callbacks, |
| 510 | ) |
| 511 | |
| 512 | |
| 513 | class UploadSubmissionTask(SubmissionTask): |
no test coverage detected