def process_extract(extract):
extract_file = os.path.join(target_dir, extract.extract + '.mbtiles')
print('Create extract {}'.format(extract_file))
# Instead of patching copy over the patch source as target and
# write directly to it (since that works concurrently).
patch_src = args['--patch-from']
if patch_src:
print('Use patch from {} as base'.format(patch_src))
shutil.copyfile(patch_src, extract_file)
try:
create_extract(extract, source_file, extract_file)
except subprocess.CalledProcessError as e:
# Failing extracts should not interrupt
# the entire process
print(e, file=sys.stderr)
return
print('Update metadata {}'.format(extract_file))
update_metadata(extract_file, extract.metadata(extract_file))
评论列表
文章目录