diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-03-26 08:51:50 -0500 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-03-26 08:51:50 -0500 |
| commit | c11d33d917bc940fd6baeaaae9c1d11d26f48af3 (patch) | |
| tree | f6b16a2a15e054f7d316f128d1e3ca83ff3b4588 /flake8/processor.py | |
| parent | da172ec641642f3c741b3360095de9e4588acb9a (diff) | |
| download | flake8-c11d33d917bc940fd6baeaaae9c1d11d26f48af3.tar.gz | |
Log the attribute error for developers
Diffstat (limited to 'flake8/processor.py')
| -rw-r--r-- | flake8/processor.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/flake8/processor.py b/flake8/processor.py index bcb33cc..bf96c7a 100644 --- a/flake8/processor.py +++ b/flake8/processor.py @@ -1,6 +1,7 @@ """Module containing our file processor that tokenizes a file for checks.""" import contextlib import io +import logging import re import sys import tokenize @@ -10,6 +11,7 @@ from flake8 import defaults from flake8 import exceptions from flake8 import utils +LOG = logging.getLogger(__name__) PyCF_ONLY_AST = 1024 NEWLINE = frozenset([tokenize.NL, tokenize.NEWLINE]) # Work around Python < 2.6 behaviour, which does not generate NL after @@ -199,8 +201,13 @@ class FileProcessor(object): if arguments is None: arguments = {} for param in parameters: - if param not in arguments: + if param in arguments: + continue + try: arguments[param] = getattr(self, param) + except AttributeError as exc: + LOG.exception(exc) + raise return arguments def check_physical_error(self, error_code, line): |
