pylint #73093 Crash After Importing a File With Bad Indentation [deprecated]

Running pylint on a file that imports a file with bad indentation causes a crash.

To replicate the bug:
1) echo "def expects_indented_block():" > buggy.py
2) echo "import buggy" > importer.py
3) pylint importer.py

I'm using python 2.6 and pylint 0.23.0 (installed with easy_install).

The traceback:
Traceback (most recent call last):
File "/usr/local/bin/pylint", line 5, in <module>
pkg_resources.run_script('pylint==0.23.0', 'pylint')
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 461, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1194, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.23.0-py2.6.egg/EGG-INFO/scripts/pylint", line 4, in <module>
lint.Run(sys.argv[1:])
File "/usr/local/lib/python2.6/dist-packages/pylint-0.23.0-py2.6.egg/pylint/lint.py", line 860, in __init__
linter.check(args)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.23.0-py2.6.egg/pylint/lint.py", line 493, in check
self.check_astng_module(astng, walker, rawcheckers)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.23.0-py2.6.egg/pylint/lint.py", line 565, in check_astng_module
walker.walk(astng)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.23.0-py2.6.egg/pylint/utils.py", line 524, in walk
self.walk(child)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.23.0-py2.6.egg/pylint/utils.py", line 521, in walk
cb(astng)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.23.0-py2.6.egg/pylint/checkers/variables.py", line 448, in visit_import
module = node.infer_name_module(parts[0]).next()
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.21.1-py2.6.egg/logilab/astng/bases.py", line 293, in wrapped
for res in _func(node, context, **kwargs):
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.21.1-py2.6.egg/logilab/astng/inference.py", line 181, in infer_import
yield self.do_import_module(name)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.21.1-py2.6.egg/logilab/astng/mixins.py", line 117, in do_import_module
return mymodule.import_module(modname, level=level)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.21.1-py2.6.egg/logilab/astng/scoped_nodes.py", line 335, in import_module
return MANAGER.astng_from_module_name(modname)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.21.1-py2.6.egg/logilab/astng/manager.py", line 146, in astng_from_module_name
return self.astng_from_file(filepath, modname, fallback=False)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.21.1-py2.6.egg/logilab/astng/manager.py", line 120, in astng_from_file
return ASTNGBuilder(self).file_build(filepath, modname)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.21.1-py2.6.egg/logilab/astng/builder.py", line 133, in file_build
node = self.string_build(data, modname, path)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.21.1-py2.6.egg/logilab/astng/builder.py", line 142, in string_build
module = self._data_build(data, modname, path)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.21.1-py2.6.egg/logilab/astng/builder.py", line 156, in _data_build
node = parse(data + '\n')
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.21.1-py2.6.egg/logilab/astng/builder.py", line 43, in parse
return compile(string, "<string>", 'exec', PyCF_ONLY_AST)
File "<string>", line 2

^
IndentationError: expected an indented block

Thanks for providing a great product -- pylint helps a ton, and this is the first bug that I've seen in it!
-Sam

prioritynormal
typebug
done in<not specified>
load0.000
load left0.000
closed by<not specified>