From 26f1338ca29c90ff022c4b308caa50373f5eb296 Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Tue, 9 Feb 2021 14:34:27 +0000 Subject: [PATCH] Fixed removal of old deps --- scripts/exports.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/exports.py b/scripts/exports.py index 5d0f114..0d88dd3 100644 --- a/scripts/exports.py +++ b/scripts/exports.py @@ -45,7 +45,7 @@ def bom_to_parts(bom_dir, part_type, assembly = None): if words: last_word = words[-1] if last_word.endswith(suffix): - part_files.append(last_word[:-4] + '.' + part_type) + part_files.append(last_word[:-4] + '.' + part_type) return part_files def usage(t): @@ -74,8 +74,9 @@ def make_parts(target, part_type, parts = None): if not os.path.isdir(deps_dir): os.makedirs(deps_dir) - if os.path.isdir(top_dir + '/deps'): #old location - shutil.rmtree(top_dir + '/deps') + old_deps = top_dir + 'deps' #old location + if os.path.isdir(old_deps): + shutil.rmtree(old_deps) times.read_times(target_dir) #