summaryrefslogtreecommitdiff
path: root/rebuilder.py
diff options
context:
space:
mode:
authorTorsten Marek <tmarek@google.com>2013-07-24 08:52:53 +0200
committerTorsten Marek <tmarek@google.com>2013-07-24 08:52:53 +0200
commit014ee2d795f0596e620b02ae36fefb0b47313a5a (patch)
tree5a9b17628b7357064620bce7f4b844930af1847c /rebuilder.py
parent9427929322c30b7640523c4611c72717904227cc (diff)
downloadastroid-git-014ee2d795f0596e620b02ae36fefb0b47313a5a.tar.gz
Update some function definitions in py2stdlib's hashlib stub module
and make sure AST transforms without a predicate always match. Test all this in a new testcase.
Diffstat (limited to 'rebuilder.py')
-rw-r--r--rebuilder.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rebuilder.py b/rebuilder.py
index cf92da09..7f4c7a71 100644
--- a/rebuilder.py
+++ b/rebuilder.py
@@ -136,7 +136,7 @@ class TreeRebuilder(object):
return node # no transform registered for this class of node
orig_node = node # copy the reference
for transform_func, predicate in transforms:
- if predicate is not None and predicate(node):
+ if predicate is None or predicate(node):
ret = transform_func(node)
# if the transformation function returns something, it's
# expected to be a replacement for the node