try to change blank errno to handle life span if type detected
catch if no td in result
This commit is contained in:
@@ -980,19 +980,23 @@ class EcoVacsXMPP(ClientXMPP):
|
||||
return result
|
||||
|
||||
elif 'type' in result:
|
||||
result['event'] = result.pop('type')
|
||||
if xml:
|
||||
result.update(xml[0].attrib)
|
||||
# result['event'] = result.pop('type')
|
||||
if 'errno' in result:
|
||||
if result['errno'] = '':
|
||||
result['errno'] = 'handle_life_span'
|
||||
result['event'] = result.pop('errno')
|
||||
if xml:
|
||||
result.update(xml[0].attrib)
|
||||
|
||||
for key in result:
|
||||
if not RepresentsInt(result[key]): #Fix to handle negative int values
|
||||
result[key] = stringcase.snakecase(result[key])
|
||||
|
||||
_LOGGER.debug("type detected in result and result is:")
|
||||
_LOGGER.debug(result)
|
||||
_LOGGER.debug("end of type detect result")
|
||||
|
||||
return result
|
||||
for key in result:
|
||||
if not RepresentsInt(result[key]): #Fix to handle negative int values
|
||||
result[key] = stringcase.snakecase(result[key])
|
||||
|
||||
_LOGGER.debug("type detected in result and result is:")
|
||||
_LOGGER.debug(result)
|
||||
_LOGGER.debug("end of type detect result")
|
||||
|
||||
return result
|
||||
|
||||
else:
|
||||
# This happens for commands with no response data, such as PlaySound
|
||||
|
||||
Reference in New Issue
Block a user