diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-22 15:56:33 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-11-22 15:56:33 +0100 |
commit | 93234d5c28024cc72a0c22d80c3d6b65f3d84686 (patch) | |
tree | 9b75229e9f799b7e77b1797a7c7360cf3ee3fe71 | |
parent | 0bd84938bb037b70cee901157880df4bf9dd7f87 (diff) | |
download | astroid-git-93234d5c28024cc72a0c22d80c3d6b65f3d84686.tar.gz |
manager / cleanup: let Pylint catch the errors
This try-except block was accomplishing nothing except transforming an
Exception into ASTNGBuildingException; but Pylint already catches
Exceptions.
-rw-r--r-- | manager.py | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -120,18 +120,8 @@ class ASTNGManager(OptionsProviderMixIn): if modname in self._cache: return self._cache[modname] if source: - try: - from logilab.astng.builder import ASTNGBuilder - return ASTNGBuilder(self).file_build(filepath, modname) - except (SyntaxError, KeyboardInterrupt, SystemExit): - raise - except Exception, ex: - if __debug__: - print 'error while building astng for', filepath - import traceback - traceback.print_exc() - msg = 'Unable to load module %s (%s)' % (modname, ex) - raise ASTNGBuildingException, msg, sys.exc_info()[-1] + from logilab.astng.builder import ASTNGBuilder + return ASTNGBuilder(self).file_build(filepath, modname) elif fallback and modname: return self.astng_from_module_name(modname) raise ASTNGBuildingException('unable to get astng for file %s' % |