Skip to content

Commit 57badb1

Browse files
committed
Merge branch 'develop' into feature/RVR-1520-drive-target-slewing-example
2 parents c0f5e8c + 5833487 commit 57badb1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sphero_sdk/asyncio/server/handler/api_sphero_handler.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,16 @@ def _remove_worker(self, worker_list, key):
204204
worker_list.pop(key)
205205

206206
async def _handle_message(self, worker_list, msg, key):
207-
logger.debug('Looking up worker for key: {}'.format(', '.join('0x{:02x}'.format(x) for x in key)))
207+
logger.debug('Looking up worker for key: ({})'.format(', '.join('0x{:02x}'.format(x) for x in key)))
208208
try:
209209
worker = worker_list[key]
210210
logger.debug('Response handler for key found, invoking worker.')
211211
return await worker(msg)
212-
except KeyError:
213-
logger.warning('Response Handler Missing: {}'.format(', '.join('0x{:02x}'.format(x) for x in key)))
212+
except KeyError as key_error:
213+
logger.warning('KeyError for key {}'.format(key_error))
214214
pass
215-
except Exception as e:
216-
logger.error('Exception {} in {}'.format(e, ', '.join('0x{:02x}'.format(x) for x in key)))
215+
except Exception as exception:
216+
logger.error('Exception {} for key ({})'.format(exception, ', '.join('0x{:02x}'.format(x) for x in key)))
217217
pass
218218

219219
async def _handle_command(self, msg):

sphero_sdk/common/sensors/sensor_streaming_control.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def _stop_and_clear_streaming_service(self, processor):
177177

178178
def _process_streaming_response(self, processor, response):
179179
response_token_uint8 = response['token']
180-
raw_sensor_data = response['sensorData']
180+
raw_sensor_data = response['sensor_data']
181181
raw_start_index = 0
182182
status_flag = response_token_uint8 & 0xF0 # Check the upper nibble for flag value: 0x0 = OK, 0x1 = Invalid Data
183183
token_id = response_token_uint8 & 0x0F # Check the lower nibble for token id

0 commit comments

Comments
 (0)