[Python-projects] crash: pylint name_of_a_nonexisting_file
V.Chukharev
chukharev at mail.ru
Sat Jul 19 20:26:34 CEST 2008
Hi,
pylint crashes if a wrong filename (a nonexisting file) is given:
$ pylint name_of_a_nonexisting_file
No config file found, using default configuration
Traceback (most recent call last):
File "/usr/local/bin/pylint", line 4, in <module>
lint.Run(sys.argv[1:])
File "/usr/local/lib/python2.5/site-packages/pylint/lint.py", line 901, in __init__
linter.check(args)
File "/usr/local/lib/python2.5/site-packages/pylint/lint.py", line 457, in check
filemods = self.expand_files(files_or_modules)
File "/usr/local/lib/python2.5/site-packages/pylint/lint.py", line 527, in expand_files
self.set_current_module(modname)
File "/usr/local/lib/python2.5/site-packages/pylint/lint.py", line 552, in set_current_module
self.stats['by_module'][modname] = {}
TypeError: 'NoneType' object is unsubscriptable
$ ls name_of_a_nonexisting_file
ls: name_of_a_nonexisting_file: No such file or directory
I think this should be considered as a bug, as something similar
to the message from ls is much easier to understand.
Thanks for a nice program!
--
V. Chukharev
More information about the Python-Projects
mailing list