1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-07 13:40:48 +00:00

target: Fix creation of destination

Was previously trying to create the output directory including the
filename.
This commit is contained in:
Marc Bonnici 2018-01-08 14:04:24 +00:00 committed by setrofim
parent 853bdff936
commit 30257456ab

View File

@ -317,8 +317,9 @@ class Target(object):
self.logger.debug('Failed to run tar command on target! ' \
'Not pulling directory {}'.format(source_dir))
# Pull the file
os.mkdir(outdir)
self.pull(tar_file_name, tempfile )
if not os.path.exists(dest):
os.mkdir(dest)
self.pull(tar_file_name, tempfile)
# Decompress
f = tarfile.open(tempfile, 'r')
f.extractall(outdir)