Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Stanley committed Jan 5, 2018
2 parents 4f978e9 + f8d4388 commit 52bd505
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rover/core/servers/ArduinoSocketServer/deepstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def post(obj, recordName):
recordName: the name of the record that you want to post to
'''
if type(recordName) is not str:
raise "Your first argument needs to be a string when setting data to deepstream"
raise "Your second argument needs to be a string when setting data to deepstream"
if type(obj) is not dict:
raise "Your second argument needs to be a dict setting data to deepstream"
raise "Your first argument needs to be a dict setting data to deepstream"
payload = {"body":[{"topic": "record", "action":"write", "recordName": "rover/" + recordName, "data": obj}]}
request = requests.post('http://' + roverIp + ':4080', json=payload)
if request is not None:
Expand Down
4 changes: 2 additions & 2 deletions rover/core/servers/iftop/deepstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def post(obj, recordName):
recordName: the name of the record that you want to post to
'''
if type(recordName) is not str:
raise "Your first argument needs to be a string when setting data to deepstream"
raise "Your second argument needs to be a string when setting data to deepstream"
if type(obj) is not dict:
raise "Your second argument needs to be a dict setting data to deepstream"
raise "Your first argument needs to be a dict setting data to deepstream"
payload = {"body":[{"topic": "record", "action":"write", "recordName": "rover/" + recordName, "data": obj}]}
request = requests.post('http://' + roverIp + ':4080', json=payload)
if request is not None:
Expand Down

0 comments on commit 52bd505

Please sign in to comment.