diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-02 11:50:27 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-02 11:50:27 +0100 |
commit | e07aa81058b24d2571cdd1dd09df9a074ea30402 (patch) | |
tree | f611c84b06c369bb0c012547f2b8b531bdfbc749 /checkers | |
parent | d50f32fa5d34e56955d96d3440ade6d6ee134f11 (diff) | |
download | pylint-e07aa81058b24d2571cdd1dd09df9a074ea30402.tar.gz |
py3k: ignore __pycache__ directory for loading checkers
Diffstat (limited to 'checkers')
-rw-r--r-- | checkers/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/checkers/__init__.py b/checkers/__init__.py index 55efce3..586138f 100644 --- a/checkers/__init__.py +++ b/checkers/__init__.py @@ -135,10 +135,11 @@ def package_load(linter, directory): imported = {} for filename in listdir(directory): basename, extension = splitext(filename) - if not imported.has_key(basename) and ( - (extension in PY_EXTS and basename != '__init__') or ( - not extension and not basename == 'CVS' and - isdir(join(directory, basename)))): + if basename in imported or basename == '__pycache__': + continue + if extension in PY_EXTS and basename != '__init__' or ( + not extension and basename != 'CVS' and + isdir(join(directory, basename))): try: module = __import__(basename, globs, globs, None) except ValueError: |