summaryrefslogtreecommitdiff
path: root/scoped_nodes.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2014-04-02 16:44:09 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2014-04-02 16:44:09 +0300
commit90704dfbf9a0c21a0169f92f7e1a8ddcfcce186a (patch)
tree52480995e8e6847c574ed74ba3e265badb4d6429 /scoped_nodes.py
parent8b874f7dfeee1792293fe10fe6435bf381ec7d6a (diff)
downloadastroid-git-90704dfbf9a0c21a0169f92f7e1a8ddcfcce186a.tar.gz
Do not print the traceback for SyntaxErrors.
Diffstat (limited to 'scoped_nodes.py')
-rw-r--r--scoped_nodes.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scoped_nodes.py b/scoped_nodes.py
index d579913a..8d0a2349 100644
--- a/scoped_nodes.py
+++ b/scoped_nodes.py
@@ -284,6 +284,8 @@ class Module(LocalsDictNodeNG):
return [self.import_module(name, relative_only=True)]
except AstroidBuildingException:
raise NotFoundError(name)
+ except SyntaxError:
+ raise NotFoundError(name)
except Exception:# XXX pylint tests never pass here; do we need it?
import traceback
traceback.print_exc()