get_network_info: check response length

albatross
Willem Melching 2021-05-17 23:08:20 +02:00
parent 313741062e
commit def141571c
1 changed files with 6 additions and 2 deletions

View File

@ -137,8 +137,12 @@ class Tici(HardwareBase):
return None
if info and info.startswith('+QNWINFO: '):
info = info.replace('+QNWINFO: ', '').replace('"', '')
technology, operator, band, channel = info.split(',')
info = info.replace('+QNWINFO: ', '').replace('"', '').split(',')
if len(info) != 4:
return None
technology, operator, band, channel = info
return({
'technology': technology,