diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2013-02-25 11:50:57 +0100 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2013-02-25 11:50:57 +0100 |
commit | 2e57298846aeb72b589329f63af434bf9d74f398 (patch) | |
tree | 45099ef502b735f1a3cf7ec57d8d62f5bdeb5fee | |
parent | 5b63e55160977a6c9ddbb79e32feb21197f0a915 (diff) | |
download | pylint-git-2e57298846aeb72b589329f63af434bf9d74f398.tar.gz |
quick fix: use %s rather than %s will avoid crash if lineno is None. See https://bitbucket.org/logilab/pylint/pull-request/6/fixed-a-bug-in-clobber_in_except-causing
-rw-r--r-- | checkers/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/checkers/utils.py b/checkers/utils.py index cff12fe31..2115b5149 100644 --- a/checkers/utils.py +++ b/checkers/utils.py @@ -65,7 +65,7 @@ def clobber_in_except(node): if (stmts and not isinstance(stmts[0].ass_type(), (astng.Assign, astng.AugAssign, astng.ExceptHandler))): - return (True, (name, 'outer scope (line %i)' % (stmts[0].lineno,))) + return (True, (name, 'outer scope (line %s)' % (stmts[0].lineno,))) return (False, None) |