summaryrefslogtreecommitdiff
path: root/builder.py
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2014-10-27 00:35:18 +0200
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2014-10-27 00:35:18 +0200
commit09cd8b7eefb021f2d8327e42614bca7cbb8915f2 (patch)
treee54d46837b31f00197106ad6f104f3444c65b521 /builder.py
parent1c5cab5ce9c6bf5c2a161748d03a5fa44a69e15e (diff)
downloadastroid-git-09cd8b7eefb021f2d8327e42614bca7cbb8915f2.tar.gz
Make the source compatible with Python 2.7 and 3.3+.
Diffstat (limited to 'builder.py')
-rw-r--r--builder.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/builder.py b/builder.py
index 692016a3..4e0e225c 100644
--- a/builder.py
+++ b/builder.py
@@ -116,12 +116,12 @@ class AstroidBuilder(InspectBuilder):
"""
try:
_, encoding, data = open_source_file(path)
- except IOError, exc:
+ except IOError as exc:
msg = 'Unable to load file %r (%s)' % (path, exc)
raise AstroidBuildingException(msg)
- except SyntaxError, exc: # py3k encoding specification error
+ except SyntaxError as exc: # py3k encoding specification error
raise AstroidBuildingException(exc)
- except LookupError, exc: # unknown encoding
+ except LookupError as exc: # unknown encoding
raise AstroidBuildingException(exc)
# get module name if necessary
if modname is None: