Skip to content
Myr

Fixes #181: Handle memcached errors gracefully.

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

authored by Kyle Adams · committed by Kyle Adams · parent 6336e77 · Browse files · 1 file+8 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

1 file+8 added−2 removed

  • other:+8 added−2 removed

1 file+8 added−2 removed

modified:jinja2/bccache.py+8 added-2 removed
288 unmodified lines
289 self.prefix = prefix290 self.timeout = timeout291292 def load_bytecode(self, bucket):293 try:293 code = self.client.get(self.prefix + bucket.key)294 code = self.client.get(self.prefix + bucket.key)295 except:296 code = None297 if code is not None:298 bucket.bytecode_from_string(code)299300 def dump_bytecode(self, bucket):301 args = (self.prefix + bucket.key, bucket.bytecode_to_string())302 if self.timeout is not None:303 args += (self.timeout,)304 try:301 self.client.set(*args)305 self.client.set(*args)306 except:307 pass