Use subprocess.call() rather than Popen(), thanks Nicola.

This commit is contained in:
Nate Coraor
2015-01-28 13:25:11 -05:00
parent 11ae48a70f
commit 43159db9fe
+1 -2
View File
@@ -275,8 +275,7 @@ class Bam( Binary ):
os.symlink( dataset.file_name, dataset_symlink )
try:
command = [ 'samtools', 'index', dataset_symlink ]
proc = subprocess.Popen( args=command, stderr=open( stderr_name, 'wb' ) )
exit_code = proc.wait()
exit_code = subprocess.call( args=command, stderr=open( stderr_name, 'wb' ) )
shutil.move( dataset_symlink + '.bai', index_file.file_name )
except Exception, e:
open( stderr_name, 'ab+' ).write( 'Galaxy attempted to build the BAM index with samtools 1.0+ but failed: %s\n' % e)