HyukjinKwon commented on a change in pull request #26330: 
[WIP][SPARK-29672][PYSPARK] remove py27 support for jenkins tests
URL: https://github.com/apache/spark/pull/26330#discussion_r343982727
 
 

 ##########
 File path: dev/sparktestsupport/shellutils.py
 ##########
 @@ -57,7 +55,12 @@ def run_cmd(cmd, return_output=False):
         if return_output:
             return 
subprocess_check_output(cmd).decode(sys.getdefaultencoding())
         else:
-            return subprocess_check_call(cmd)
+            popen = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+            for stdout_line in popen.stdout:
+                print(stdout_line.decode(sys.getdefaultencoding()), end='')
+            popen.stdout.close()
+            return_code = popen.wait()
+            return return_code
 
 Review comment:
   Hm, @shaneknapp btw why do we need to do this? at least it seems going to 
work differently comparing to the past:
   
   > If the return code was zero then return, otherwise raise 
CalledProcessError. The CalledProcessError object will have the return code in 
the returncode attribute.
   
   https://docs.python.org/2/library/subprocess.html#subprocess.check_call

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to