get_network_info: check response length
parent
313741062e
commit
def141571c
|
@ -137,8 +137,12 @@ class Tici(HardwareBase):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if info and info.startswith('+QNWINFO: '):
|
if info and info.startswith('+QNWINFO: '):
|
||||||
info = info.replace('+QNWINFO: ', '').replace('"', '')
|
info = info.replace('+QNWINFO: ', '').replace('"', '').split(',')
|
||||||
technology, operator, band, channel = info.split(',')
|
|
||||||
|
if len(info) != 4:
|
||||||
|
return None
|
||||||
|
|
||||||
|
technology, operator, band, channel = info
|
||||||
|
|
||||||
return({
|
return({
|
||||||
'technology': technology,
|
'technology': technology,
|
||||||
|
|
Loading…
Reference in New Issue