asciid / stepik_scanner

Parser for stepik.org
2 stars 0 forks source link

Wrong interruption error #3

Closed asciid closed 4 years ago

asciid commented 4 years ago

If the parser is stopped in unclear way, later it can't read the position file.

  File "./parser.py", line 62, in <module>
    position = get_position(posn_file, scan_file)
  File "./parser.py", line 19, in get_position
    if content[0] in ('\n', '', ' '):
IndexError: list index out of range

Gotta think.

asciid commented 4 years ago

If you terminate the program when it works around a file -- file erases.

It can't be fixed but it can be alarmed to the user.