Package wtf :: Package app :: Package services :: Module memcache :: Class ExceptionWrapper
[hide private]
[frames] | no frames]

Class ExceptionWrapper

source code

object --+
         |
        ExceptionWrapper

Exception catching wrapper
Instance Methods [hide private]
 
__init__(self, mcc)
Initialization
source code
any
__getattr__(self, name)
Create proxy around callables, catching memcache errors.
source code
dict
get(self, *keys)
Get a list of key/value pairs from the cache (if applicable)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
Memcache _mc
Memcache connector
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, mcc)
(Constructor)

source code 
Initialization
Parameters:
Overrides: object.__init__

__getattr__(self, name)
(Qualification operator)

source code 

Create proxy around callables, catching memcache errors.

The proxy functions are cached.

Parameters:
  • name (str) - The attribute to wrap up
Returns: any
The original attribute or the proxied placeholder
Raises:
  • AttributeError - The attribute was not found

get(self, *keys)

source code 

Get a list of key/value pairs from the cache (if applicable)

The returned dict contains all pairs it could get. But keys maybe missing or the dict might be completely empty (of course).

Parameters:
  • keys (tuple) - The keys to fetch
Returns: dict
The dict of key/value pairs