summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-11-22 15:56:33 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-11-22 15:56:33 +0100
commit93234d5c28024cc72a0c22d80c3d6b65f3d84686 (patch)
tree9b75229e9f799b7e77b1797a7c7360cf3ee3fe71
parent0bd84938bb037b70cee901157880df4bf9dd7f87 (diff)
downloadastroid-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.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/manager.py b/manager.py
index c496f9ae..33c28427 100644
--- a/manager.py
+++ b/manager.py
@@ -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' %