diff --git a/.travis.yml b/.travis.yml index fb05479..64c30f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,8 @@ deploy: - LICENSE - kwikapi/api.py - kwikapi/__init__.py - name: kwikapi-0.5.14 - tag_name: 0.5.14 + name: kwikapi-0.5.15 + tag_name: 0.5.15 true: repo: deep-compute/kwikapi - provider: pypi diff --git a/kwikapi/client.py b/kwikapi/client.py index c741ef9..5cdfeed 100644 --- a/kwikapi/client.py +++ b/kwikapi/client.py @@ -143,9 +143,17 @@ def _make_request(self, url, post_body, headers): @staticmethod def _deserialize_response(data, proto, raise_exception=True): + proto = Client._get_protocol(proto) # Checking for a valid protocol object r = proto.deserialize(data) return Client._extract_response(r, raise_exception) + @staticmethod + def _get_protocol(proto): + if isinstance(proto, str): + return PROTOCOLS[proto] + else: + return proto + @staticmethod def _extract_response(r, raise_exception=True): success = r["success"] diff --git a/setup.py b/setup.py index fa7eaed..e9dc25f 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = "0.5.14" +version = "0.5.15" setup( name="kwikapi", version=version,