(key: str)
| 108 | |
| 109 | |
| 110 | def _get_bytes_sync(key: str) -> Optional[Tuple[bytes, str]]: |
| 111 | try: |
| 112 | resp = _get_client().get_object(Bucket=R2_BUCKET, Key=key) |
| 113 | except ClientError as e: |
| 114 | if e.response["Error"]["Code"] in ("NoSuchKey", "404"): |
| 115 | return None |
| 116 | raise |
| 117 | return resp["Body"].read(), resp.get("ContentType", "application/octet-stream") |
| 118 | |
| 119 | |
| 120 | def _delete_sync(key: str) -> None: |
nothing calls this directly
no test coverage detected