Skip to content

Commit

Permalink
0.7.3.1 Set default format to json, if server does not send any format
Browse files Browse the repository at this point in the history
  • Loading branch information
Norbert Heusser committed Nov 27, 2018
1 parent 80990f9 commit 77b42b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dslink/Handshake.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ def run_handshake(self):
server_config = json.loads(response.text)
self.link.server_config = server_config
self.link.logger.debug("Server handshake body: %s" % json.dumps(server_config))
if server_config["format"] is not None:
if "format" in self.link.server_config and server_config["format"] is not None:
self.link.config.comm_format = server_config["format"]
else:
self.link.config.comm_format = "json"
if "tempKey" in self.link.server_config:
self.link.needs_auth = True
tempkey = self.keypair.keypair.decode_tempkey(
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

setup(
name="dslink",
version="0.7.3",
version="0.7.3.1",
description="DSLink SDK for Python",
url="http://github.com/IOT-DSA/sdk-dslink-python",
url="http://github.com/NorbertHeusser/sdk-dslink-python.git",
author="Logan Gorence",
author_email="[email protected]",
license="Apache 2.0",
Expand Down

0 comments on commit 77b42b4

Please sign in to comment.