bcl2fastq2 package: recursively delete after copy (#9959)
Fixes #9944
73c978d
replaced a move with a copy, which cased rmdir to fail (as
it expects an empty directory). This switches to use `shutil.rmtree`
instead.
This commit is contained in:
parent
33b112a60d
commit
e4e980ee97
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import glob
|
import glob
|
||||||
import llnl.util.tty as tty
|
import llnl.util.tty as tty
|
||||||
|
|
||||||
@ -71,11 +72,10 @@ def wrap():
|
|||||||
tty.msg("The tarball has already been unpacked")
|
tty.msg("The tarball has already been unpacked")
|
||||||
else:
|
else:
|
||||||
tty.msg("Unpacking bcl2fastq2 tarball")
|
tty.msg("Unpacking bcl2fastq2 tarball")
|
||||||
tty.msg("cwd sez: {0}".format(os.getcwd()))
|
|
||||||
tarball = glob.glob(join_path('spack-expanded-archive',
|
tarball = glob.glob(join_path('spack-expanded-archive',
|
||||||
'bcl2fastq2*.tar.gz'))[0]
|
'bcl2fastq2*.tar.gz'))[0]
|
||||||
copy(tarball, '.')
|
copy(tarball, '.')
|
||||||
os.rmdir('spack-expanded-archive')
|
shutil.rmtree('spack-expanded-archive')
|
||||||
tar = which('tar')
|
tar = which('tar')
|
||||||
tarball = os.path.basename(tarball)
|
tarball = os.path.basename(tarball)
|
||||||
tar('-xf', tarball)
|
tar('-xf', tarball)
|
||||||
|
Loading…
Reference in New Issue
Block a user