Browse Source

make _serializers and _deserializers part of instance not the module

master
Brett Langdon 12 years ago
parent
commit
5ca2cad595
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      riakcached/client.py

+ 6
- 6
riakcached/client.py View File

@ -20,12 +20,6 @@ class RiakClient(object):
"bucket",
"url",
]
_serializers = {
"application/json": json.dumps,
}
_deserializers = {
"application/json": json.loads,
}
def __init__(self, bucket, url="http://127.0.0.1:8098", timeout=2):
"""
@ -34,6 +28,12 @@ class RiakClient(object):
self.url = url.strip("/")
self._timeout = timeout
self._connect()
self._serializers = {
"application/json": json.dumps,
}
self._deserializers = {
"application/json": json.loads,
}
def setup_serializer(self, content_type, serializer, deserializer):
"""


Loading…
Cancel
Save