diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py index 803caa0c480e7..a40311d9fcf02 100755 --- a/ec2/spark_ec2.py +++ b/ec2/spark_ec2.py @@ -693,7 +693,7 @@ def ssh(host, opts, command): def _check_output(*popenargs, **kwargs): if 'stdout' in kwargs: raise ValueError('stdout argument not allowed, it will be overridden.') - process = subprocess.Popen(stdout=PIPE, *popenargs, **kwargs) + process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs) output, unused_err = process.communicate() retcode = process.poll() if retcode: