Skip to content

Commit c6ed85c

Browse files
added compatibility for python 2.6 for ssh_read command
1 parent 9535f40 commit c6ed85c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ec2/spark_ec2.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,11 @@ def ssh(host, opts, command):
670670

671671

672672
def ssh_read(host, opts, command):
673+
if sys.version_info < (2, 7):
674+
return subprocess.Popen(
675+
ssh_command(opts) + ['%s@%s' %
676+
(opts.user, host), stringify_command(command)],
677+
stdout=subprocess.PIPE).stdout
673678
return subprocess.check_output(
674679
ssh_command(opts) + ['%s@%s' % (opts.user, host), stringify_command(command)])
675680

0 commit comments

Comments
 (0)