Ensure exceptions are pickleable

This commit is contained in:
Anthony Sottile 2019-02-19 08:38:37 -08:00
parent 9b770f590e
commit e8de066f94
3 changed files with 74 additions and 27 deletions

View file

@ -118,7 +118,7 @@ class FileProcessor(object):
tokenize.generate_tokens(lambda: next(line_iter))
)
except tokenize.TokenError as exc:
raise exceptions.InvalidSyntax(exc.message, exception=exc)
raise exceptions.InvalidSyntax(exception=exc)
return self._file_tokens