summaryrefslogtreecommitdiff
path: root/rebuilder.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-12-02 17:50:56 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-12-02 17:50:56 +0100
commit10f72783077d5ceaa90944e19e54acb5af9bc0ba (patch)
treec3185ed9308b689b1472cd6420f449bacd068bf7 /rebuilder.py
parent957735efa408c22a8c6702f42d076d3b3458f9b0 (diff)
downloadastroid-git-10f72783077d5ceaa90944e19e54acb5af9bc0ba.tar.gz
py3k: fix some obvious stuff
Diffstat (limited to 'rebuilder.py')
-rw-r--r--rebuilder.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rebuilder.py b/rebuilder.py
index 9330711c..b5ba9cfc 100644
--- a/rebuilder.py
+++ b/rebuilder.py
@@ -846,7 +846,8 @@ class TreeRebuilder3k(TreeRebuilder):
"""visit an ExceptHandler node by returning a fresh instance of it"""
newnode = new.ExceptHandler()
_lineno_parent(node, newnode, parent)
- newnode.type = self.visit(node.type, newnode)
+ if node.type is not None:
+ newnode.type = self.visit(node.type, newnode)
if node.name is not None:
newnode.name = self.visit_assname(node, newnode, node.name)
newnode.body = [self.visit(child, newnode) for child in node.body]