diff options
author | Daniel Balparda <balparda@google.com> | 2015-03-16 15:11:41 -0700 |
---|---|---|
committer | Daniel Balparda <balparda@google.com> | 2015-03-16 15:11:41 -0700 |
commit | a0207ede3d1dc84946bac72992a91248abea8031 (patch) | |
tree | 87420f2be819593d9488b57d4b2eb91864ed593a /astroid/builder.py | |
parent | 9e6ad06426b335bce5756fa1ebe98486b40c57aa (diff) | |
download | astroid-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.py | 2 |
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) |