summaryrefslogtreecommitdiff
path: root/as_string.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-10-12 10:31:00 +0200
committerEmile Anclin <emile.anclin@logilab.fr>2010-10-12 10:31:00 +0200
commit650f0a151ca98b8e91a91c11305b84f771c64dbb (patch)
treea2a923ec8d2699b1fe6bd38b595e07bc1b672f30 /as_string.py
parentcbaee0645c621ecb043a2bf39f66c5df391cbe8b (diff)
downloadastroid-git-650f0a151ca98b8e91a91c11305b84f771c64dbb.tar.gz
py3k / Raise : use "exc" instead of "type"
have other attributes explicitly different for 2.x and 3.x
Diffstat (limited to 'as_string.py')
-rw-r--r--as_string.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/as_string.py b/as_string.py
index 76276d1f..ddd8be22 100644
--- a/as_string.py
+++ b/as_string.py
@@ -308,15 +308,15 @@ class AsStringVisitor(ASTVisitor):
def visit_raise(self, node):
"""return an astng.Raise node as string"""
- if node.type:
+ if node.exc:
if node.inst:
if node.tback:
- return 'raise %s, %s, %s' % (node.type.accept(self),
+ return 'raise %s, %s, %s' % (node.exc.accept(self),
node.inst.accept(self),
node.tback.accept(self))
- return 'raise %s, %s' % (node.type.accept(self),
+ return 'raise %s, %s' % (node.exc.accept(self),
node.inst.accept(self))
- return 'raise %s' % node.type.accept(self)
+ return 'raise %s' % node.exc.accept(self)
return 'raise'
def visit_return(self, node):