Fixed plateup using target dir when no panels or platters.

This commit is contained in:
Chris Palmer 2021-02-21 14:18:41 +00:00
parent 041d720c39
commit e0b89359aa

View File

@ -44,18 +44,22 @@ def plateup(target, part_type, usage = None):
source_dir1 = source_dirs[part_type] source_dir1 = source_dirs[part_type]
source_dir2 = top_dir + source_dirs[part_type] source_dir2 = top_dir + source_dirs[part_type]
times.read_times(target_dir)
# #
# Loop through source directories # Loop through source directories
# #
all_used = [] all_used = []
all_sources = [] all_sources = []
all_parts = [] all_parts = []
read_times = False
for dir in [source_dir1, source_dir2]: for dir in [source_dir1, source_dir2]:
if not os.path.isdir(dir): if not os.path.isdir(dir):
continue continue
if not os.path.isdir(target_dir): if not os.path.isdir(target_dir):
os.makedirs(target_dir) os.makedirs(target_dir)
if not read_times:
times.read_times(target_dir)
read_times = True
# #
# Make the deps dir # Make the deps dir
# #
@ -140,4 +144,4 @@ def plateup(target, part_type, usage = None):
print("Removing %s" % file) print("Removing %s" % file)
os.remove(deps_dir + '/' + file) os.remove(deps_dir + '/' + file)
times.print_times(all_parts) times.print_times(all_parts)