Commits

Audrius Kažukauskas committed 785cd1f

python_check_syntax.vim: Fix bug when exception offset is None.

  • Participants
  • Parent commits 40dabb3

Comments (0)

Files changed (1)

File ftplugin/python/python_check_syntax.vim

         try:
             tree = compile(source, filename, 'exec', _ast.PyCF_ONLY_AST)
         except (SyntaxError, IndentationError), e:
-            messages.append([e.lineno, e.offset, e.args[0]])
+            messages.append([e.lineno, e.offset or 0, e.args[0]])
         except Exception, e:
             messages.append([1, 0, e.args[0]])
         else: