summaryrefslogtreecommitdiff
path: root/astroid/builder.py
diff options
context:
space:
mode:
authorDaniel Balparda <balparda@google.com>2015-03-16 15:11:41 -0700
committerDaniel Balparda <balparda@google.com>2015-03-16 15:11:41 -0700
commita0207ede3d1dc84946bac72992a91248abea8031 (patch)
tree87420f2be819593d9488b57d4b2eb91864ed593a /astroid/builder.py
parent9e6ad06426b335bce5756fa1ebe98486b40c57aa (diff)
downloadastroid-a0207ede3d1dc84946bac72992a91248abea8031.tar.gz
Fix bug/crash when confronted with an invalid \x escape (ex: '\x1').
Diffstat (limited to 'astroid/builder.py')
-rw-r--r--astroid/builder.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/astroid/builder.py b/astroid/builder.py
index 1fe7a36..319e6e6 100644
--- a/astroid/builder.py
+++ b/astroid/builder.py
@@ -162,7 +162,7 @@ class AstroidBuilder(InspectBuilder):
# this method could be wrapped with a pickle/cache function
try:
node = parse(data + '\n')
- except TypeError as exc:
+ except (TypeError, ValueError) as exc:
raise AstroidBuildingException(exc)
if path is not None:
node_file = abspath(path)