(self, environment, template)
| 229 | self.package_path = package_path |
| 230 | |
| 231 | def get_source(self, environment, template): |
| 232 | pieces = split_template_path(template) |
| 233 | p = '/'.join((self.package_path,) + tuple(pieces)) |
| 234 | if not self.provider.has_resource(p): |
| 235 | raise TemplateNotFound(template) |
| 236 | |
| 237 | filename = uptodate = None |
| 238 | if self.filesystem_bound: |
| 239 | filename = self.provider.get_resource_filename(self.manager, p) |
| 240 | mtime = path.getmtime(filename) |
| 241 | def uptodate(): |
| 242 | try: |
| 243 | return path.getmtime(filename) == mtime |
| 244 | except OSError: |
| 245 | return False |
| 246 | |
| 247 | source = self.provider.get_resource_string(self.manager, p) |
| 248 | return source.decode(self.encoding), filename, uptodate |
| 249 | |
| 250 | def list_templates(self): |
| 251 | path = self.package_path |
nothing calls this directly
no test coverage detected