mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 02:46:52 +00:00
Use str(exc) instead of exc.message
...since on py3 tokenize.TokenError does not have a 'message' attribute. See #203.
This commit is contained in:
parent
9a4abfbcb4
commit
45ae0b9eeb
1 changed files with 1 additions and 1 deletions
|
|
@ -247,7 +247,7 @@ class FileProcessor(object):
|
|||
# course, I'm going to be unsurprised to be proven wrong at a later
|
||||
# date.
|
||||
except tokenize.TokenError as exc:
|
||||
raise exceptions.InvalidSyntax(exc.message, exception=exc)
|
||||
raise exceptions.InvalidSyntax(str(exc), exception=exc)
|
||||
|
||||
def line_for(self, line_number):
|
||||
"""Retrieve the physical line at the specified line number."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue