(self, inner_path, mode="rb")
| 180 | return super(SiteStoragePlugin, self).list(inner_path, *args, **kwags) |
| 181 | |
| 182 | def read(self, inner_path, mode="rb"): |
| 183 | if ".zip/" in inner_path or ".tar.gz/" in inner_path: |
| 184 | match = re.match("^(.*\.(?:tar.gz|tar.bz2|zip))(.*)", inner_path) |
| 185 | archive_inner_path, path_within = match.groups() |
| 186 | archive = self.openArchive(archive_inner_path) |
| 187 | path_within = path_within.lstrip("/") |
| 188 | |
| 189 | if archive_inner_path.endswith(".zip"): |
| 190 | return archive.open(path_within).read() |
| 191 | else: |
| 192 | return archive.extractfile(path_within).read() |
| 193 | |
| 194 | else: |
| 195 | return super(SiteStoragePlugin, self).read(inner_path, mode) |
| 196 |
no test coverage detected