get_data(pathname) -> string with file data. Return the data associated with 'pathname'. Raise OSError if the file wasn't found.
(self, pathname)
| 197 | |
| 198 | |
| 199 | def get_data(self, pathname): |
| 200 | """get_data(pathname) -> string with file data. |
| 201 | |
| 202 | Return the data associated with 'pathname'. Raise OSError if |
| 203 | the file wasn't found. |
| 204 | """ |
| 205 | if alt_path_sep: |
| 206 | pathname = pathname.replace(alt_path_sep, path_sep) |
| 207 | |
| 208 | key = pathname |
| 209 | if pathname.startswith(self.archive + path_sep): |
| 210 | key = pathname[len(self.archive + path_sep):] |
| 211 | |
| 212 | try: |
| 213 | toc_entry = self._files[key] |
| 214 | except KeyError: |
| 215 | raise OSError(0, '', key) |
| 216 | return _get_data(self.archive, toc_entry) |
| 217 | |
| 218 | |
| 219 | # Return a string matching __file__ for the named module |
nothing calls this directly
no test coverage detected