Skip to content

Commit d497a4c

Browse files
committed
Use aboutcode-toolkit-extract- prefix for zip extraction dirs
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent ed9d226 commit d497a4c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/attributecode/util.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def apply_mapping(abouts, mapping_file=None):
352352
the mapping from the default mnapping.config if an alternate
353353
mapping dict is not provided.
354354
"""
355-
355+
356356
if not mapping_file:
357357
return abouts
358358

@@ -418,7 +418,7 @@ def format_output(about_data, mapping_file=None):
418418
order_dict[other_key] = about_data[other_key]
419419
return order_dict
420420

421-
#FIXME: why is this used for
421+
# FIXME: why is this used for
422422
def get_about_file_path(location, mapping_file=None):
423423
"""
424424
Read file at location, return a list of about_file_path.
@@ -548,11 +548,12 @@ def extract_zip(location):
548548
"""
549549
import zipfile
550550
import tempfile
551+
551552
if not zipfile.is_zipfile(location):
552553
raise Exception('Incorrect zip file %(location)r' % locals())
553554

554555
archive_base_name = os.path.basename(location).replace('.zip', '')
555-
base_dir = tempfile.mkdtemp()
556+
base_dir = tempfile.mkdtemp(prefix='aboutcode-toolkit-extract-')
556557
target_dir = os.path.join(base_dir, archive_base_name)
557558
target_dir = add_unc(target_dir)
558559
os.makedirs(target_dir)

0 commit comments

Comments
 (0)