Skip to content

Commit

Permalink
Merge pull request #103 from arrangeesh/master
Browse files Browse the repository at this point in the history
Added deserialize fix
  • Loading branch information
Ram Idavalapati authored Mar 13, 2020
2 parents e21cac4 + 8f5d13a commit 39f8c76
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions kwikapi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

version = "0.5.14"
version = "0.5.15"
setup(
name="kwikapi",
version=version,
Expand Down

0 comments on commit 39f8c76

Please sign in to comment.