Skip to content

Commit 8a9ef9c

Browse files
make check_return_code an iterator
1 parent 0486ae3 commit 8a9ef9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/rdd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ def check_return_code():
711711
raise Exception("Pipe function `%s' exited "
712712
"with error code %d" % (command, pipe.returncode))
713713
else:
714-
return None
714+
yield None
715715
return (x.rstrip(b'\n').decode('utf-8') for x in
716716
chain(iter(pipe.stdout.readline, b''), iter(check_return_code, None)))
717717
return self.mapPartitions(func)

0 commit comments

Comments
 (0)