andoniaf/pyemtvlc

Fails when ask for some stops lower than 10

andoniaf opened this issue · 0 comments

➜ pyemtvlc 8 
Parada: 8
Traceback (most recent call last):
  File "/home/andoniaf/.local/bin/pyemtvlc", line 25, in <module>
    main()
  File "/home/andoniaf/.local/bin/pyemtvlc", line 20, in main
    msg = next_buses(numParada, numLinea)
  File "/home/andoniaf/.local/lib/python3.6/site-packages/utils/parser.py", line 54, in next_buses
    return generate_msg(info)
  File "/home/andoniaf/.local/lib/python3.6/site-packages/utils/parser.py", line 42, in generate_msg
    if info[0][0] is None:
IndexError: list index out of range


➜ pyemtvlc 5
Parada: 5
La parada no existe o esta temporalmente no disponible


➜ pyemtvlc 2
Parada: 2
Traceback (most recent call last):
  File "/home/andoniaf/.local/bin/pyemtvlc", line 25, in <module>
    main()
  File "/home/andoniaf/.local/bin/pyemtvlc", line 20, in main
    msg = next_buses(numParada, numLinea)
  File "/home/andoniaf/.local/lib/python3.6/site-packages/utils/parser.py", line 54, in next_buses
    return generate_msg(info)
  File "/home/andoniaf/.local/lib/python3.6/site-packages/utils/parser.py", line 42, in generate_msg
    if info[0][0] is None:
IndexError: list index out of range