diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-10-28 18:16:52 +0200 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-10-28 18:16:52 +0200 |
commit | d50f32fa5d34e56955d96d3440ade6d6ee134f11 (patch) | |
tree | 5fd3ddaa02d7c698850da7412d2e6ac5a08a4cf9 /checkers/exceptions.py | |
parent | 880c7ff5bbaafb2507506ed8dfab4b738c81a9c5 (diff) | |
download | pylint-d50f32fa5d34e56955d96d3440ade6d6ee134f11.tar.gz |
py3k: fix __builtin__ vs builtins
Diffstat (limited to 'checkers/exceptions.py')
-rw-r--r-- | checkers/exceptions.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/checkers/exceptions.py b/checkers/exceptions.py index 1f7e227..87fdc25 100644 --- a/checkers/exceptions.py +++ b/checkers/exceptions.py @@ -16,6 +16,8 @@ """ import sys +from logilab.common.compat import builtins +BUILTINS_NAME = builtins.__name__ from logilab import astng from logilab.astng import YES, Instance, unpack_infer @@ -23,6 +25,7 @@ from pylint.checkers import BaseChecker from pylint.checkers.utils import is_empty, is_raising from pylint.interfaces import IASTNGChecker + MSGS = { 'E0701': ( 'Bad except clauses order (%s)', @@ -115,7 +118,7 @@ class ExceptionsChecker(BaseChecker): expr = expr._proxied if (isinstance(expr, astng.Class) and not inherit_from_std_ex(expr) and - expr.root().name != '__builtin__'): + expr.root().name != BUILTINS_NAME): if expr.newstyle: self.add_message('E0710', node=node) else: |