summaryrefslogtreecommitdiff
path: root/nodes.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2009-03-09 15:59:14 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2009-03-09 15:59:14 +0100
commit56b2fe9087b378b762e449dca1c7c7753184273f (patch)
tree4d17e70932da6146623a62232736253a2e512bbe /nodes.py
parent47aab8af02f905efecc07b1398c118f53154b153 (diff)
downloadastroid-git-56b2fe9087b378b762e449dca1c7c7753184273f.tar.gz
remove Yield's parent node if it is a Discard; testcase
--HG-- branch : _ast_compat
Diffstat (limited to 'nodes.py')
-rw-r--r--nodes.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nodes.py b/nodes.py
index 7fa07cb2..05f0bfa6 100644
--- a/nodes.py
+++ b/nodes.py
@@ -309,8 +309,8 @@ def _get_child_sequence(self, child):
if isinstance(sequence, (tuple, list)) and child in sequence:
return sequence
else:
- msg = 'Could not found %s in %s\'s children' % (child, self)
- raise ASTNGError(msg)
+ msg = 'Could not found %s line %d in %s\'s children line %d'
+ raise ASTNGError(msg % (child, child.lineno, self, self.lineno))
def replace_child(self, child, newchild):
sequence = _get_child_sequence(self, child)