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 | 012068611bc2f70b09facdd02bd34991d0a5488c (patch) | |
| tree | 025a59cb1b751abc4e9409034118046233d46f0c /lint.py | |
| parent | d69ee5b2ccffc820bbe461c41a68b1fd1d2d6d4b (diff) | |
| download | pylint-git-012068611bc2f70b09facdd02bd34991d0a5488c.tar.gz | |
Use the new Module.close to close the file streams.
Diffstat (limited to 'lint.py')
| -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 |
