Skip to content

Commit

Permalink
make check_return_code an iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
megatron-me-uk committed Jun 24, 2015
1 parent 0486ae3 commit 8a9ef9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ def check_return_code():
raise Exception("Pipe function `%s' exited "
"with error code %d" % (command, pipe.returncode))
else:
return None
yield None
return (x.rstrip(b'\n').decode('utf-8') for x in
chain(iter(pipe.stdout.readline, b''), iter(check_return_code, None)))
return self.mapPartitions(func)
Expand Down

0 comments on commit 8a9ef9c

Please sign in to comment.