(file, _, __, **kwargs)
| 71 | |
| 72 | |
| 73 | def _to_msgpack(file, _, __, **kwargs): |
| 74 | if not msgpack_available: |
| 75 | raise BoxError(f'File "{file}" is msgpack but no package is available to open it. Please install "msgpack"') |
| 76 | try: |
| 77 | return Box.from_msgpack(filename=file, **kwargs) |
| 78 | except (UnpackException, ValueError): |
| 79 | raise BoxError("File is not msgpack as expected") |
| 80 | except BoxError: |
| 81 | return BoxList.from_msgpack(filename=file, **kwargs) |
| 82 | |
| 83 | |
| 84 | def _to_toon(file, encoding, errors, **kwargs): |
nothing calls this directly
no test coverage detected