Skip to content
Myr

Fixed FileSystemBytecodeCache.clear

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent a816bf4 · Browse files · 2 files+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−2 removed

  • other:+3 added−2 removed

2 files+3 added−2 removed

modified:jinja2/bccache.py+2 added-1 removed
206 unmodified lines
207 finally:208 f.close()209210 def clear(self):211 for filename in filter(listdir(self.directory), self.pattern % '*'):211 files = fnmatch.filter(listdir(self.directory), self.pattern % '*')212 for filename in files:213 try:214 remove(path.join(self.directory, filename))215 except OSError:216 pass
modified:jinja2/loaders.py+1 added-1 removed
209 unmodified lines
210211 def get_source(self, environment, template):212 if template in self.mapping:213 source = self.mapping[template]214 return source, None, lambda: source != self.mapping[template]214 return source, None, lambda: source != self.mapping.get(template)215 raise TemplateNotFound(template)216217218class FunctionLoader(BaseLoader):
81 unmodified lines