diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2014-11-25 18:44:47 +0200 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2014-11-25 18:44:47 +0200 |
commit | 0b3f88c3efd475102669a12283ecf411d6d276ba (patch) | |
tree | 2f5be9c26b2b6f53a2f5886be6722879d625936f | |
parent | 9af934083b7e3fadcc6b06ee1d5856ea0ef967b2 (diff) | |
download | pylint-0b3f88c3efd475102669a12283ecf411d6d276ba.tar.gz |
Use the new Module.close to close the file streams.
-rw-r--r-- | lint.py | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -862,14 +862,8 @@ class PyLinter(OptionsManagerMixIn, MessagesHandlerMixIn, ReportsHandlerMixIn, return self._check_astroid_module(astroid, walker, rawcheckers, tokencheckers) finally: - # Close file_stream, if opened, to avoid to open many files. - if astroid.file_stream: - astroid.file_stream.close() - # TODO(cpopa): This is an implementation detail, but it will - # be moved in astroid at some point. - # We invalidate the cached property, to let the others - # modules which relies on this one to get a new file stream. - del astroid.file_stream + # Close the streams opened by the ast module. + astroid.close() def _check_astroid_module(self, astroid, walker, rawcheckers, tokencheckers): # call raw checkers if possible |