Commits

Georg Brandl  committed 5e8e401

Fix find_error script if error is in very beginning of file.

  • Participants
  • Parent commits e41af56

Comments (0)

Files changed (1)

File scripts/find_error.py

                 for tok, state in map(None, tokens, states):
                     show_token(tok, state)
             else:
-                for i in range(len(tokens) - num, len(tokens)):
+                for i in range(max(len(tokens) - num, 0), len(tokens)):
                     show_token(tokens[i], states[i])
             print 'Error token:'
             l = len(repr(val))