Skip to content

Commit

Permalink
Update _controller.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Nov 2, 2017
1 parent 19cf17b commit ef0fb11
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/py/autowig/_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,14 @@ def cleaning(asg):
pass
nodes = sorted([node for node in asg.nodes() if node.clean], key=lambda node: -len(node.ancestors))
for node in nodes:
if node._node not in ['::', '/']:
asg._syntax_edges[node.parent._node].remove(node._node)
if isinstance(node, (ClassTemplateSpecializationProxy, ClassTemplatePartialSpecializationProxy)):
asg._specialization_edges[node.specialize._node].remove(node._node)
try:
if node._node not in ['::', os.sep]:
asg._syntax_edges[node.parent._node].remove(node._node)
if isinstance(node, (ClassTemplateSpecializationProxy, ClassTemplatePartialSpecializationProxy)):
asg._specialization_edges[node.specialize._node].remove(node._node)
except Exception as e:
print node._node
raise e

nodes = set([node._node for node in nodes])

Expand Down

0 comments on commit ef0fb11

Please sign in to comment.