Skip to content

Commit a0c0161

Browse files
fix generator issue
1 parent 8a9ef9c commit a0c0161

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/pyspark/rdd.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -711,9 +711,10 @@ def check_return_code():
711711
raise Exception("Pipe function `%s' exited "
712712
"with error code %d" % (command, pipe.returncode))
713713
else:
714-
yield None
714+
for i in range(0):
715+
yield i
715716
return (x.rstrip(b'\n').decode('utf-8') for x in
716-
chain(iter(pipe.stdout.readline, b''), iter(check_return_code, None)))
717+
chain(iter(pipe.stdout.readline, b''), check_return_code()))
717718
return self.mapPartitions(func)
718719

719720
def foreach(self, f):

0 commit comments

Comments
 (0)