Skip to content

Commit

Permalink
fix fail_condition
Browse files Browse the repository at this point in the history
return True when an exception should be raised
  • Loading branch information
megatron-me-uk committed Jun 30, 2015
1 parent b0ac3a4 commit eb4801c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,10 @@ def fail_condition(x):
return False
elif mode == 'strict':
def fail_condition(x):
return x == 0
return x != 0
elif mode == 'grep':
def fail_condition(x):
return x == 0 or x == 1
return x != 0 and x != 1
else:
raise ValueError("mode must be one of 'permissive', 'strict' or 'grep'.")

Expand Down

0 comments on commit eb4801c

Please sign in to comment.