summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWouter Bolsterlee <wouter@bolsterl.ee>2016-08-05 11:15:04 +0200
committerWouter Bolsterlee <wouter@bolsterl.ee>2016-08-05 11:15:04 +0200
commit45ae0b9eebc1e47df1a049e75d64e25118299d65 (patch)
tree3670070448763ef56052f0477051c37a570d5065
parent9a4abfbcb47283fa02d22811b001a3b52f2df97a (diff)
downloadflake8-45ae0b9eebc1e47df1a049e75d64e25118299d65.tar.gz
Use str(exc) instead of exc.message
...since on py3 tokenize.TokenError does not have a 'message' attribute. See #203.
-rw-r--r--src/flake8/processor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flake8/processor.py b/src/flake8/processor.py
index 1d0e3a4..2a4014e 100644
--- a/src/flake8/processor.py
+++ b/src/flake8/processor.py
@@ -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."""