(self, environment, template)
| 165 | self.followlinks = followlinks |
| 166 | |
| 167 | def get_source(self, environment, template): |
| 168 | pieces = split_template_path(template) |
| 169 | for searchpath in self.searchpath: |
| 170 | filename = path.join(searchpath, *pieces) |
| 171 | f = open_if_exists(filename) |
| 172 | if f is None: |
| 173 | continue |
| 174 | try: |
| 175 | contents = f.read().decode(self.encoding) |
| 176 | finally: |
| 177 | f.close() |
| 178 | |
| 179 | mtime = path.getmtime(filename) |
| 180 | |
| 181 | def uptodate(): |
| 182 | try: |
| 183 | return path.getmtime(filename) == mtime |
| 184 | except OSError: |
| 185 | return False |
| 186 | return contents, filename, uptodate |
| 187 | raise TemplateNotFound(template) |
| 188 | |
| 189 | def list_templates(self): |
| 190 | found = set() |
nothing calls this directly
no test coverage detected