mirror of
https://github.com/amix/vimrc
synced 2025-07-04 06:44:59 +08:00
Ensure temp_directory is always removed eventually
This commit is contained in:
@ -110,10 +110,10 @@ def update(plugin):
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
temp_directory = tempfile.mkdtemp()
|
temp_directory = tempfile.mkdtemp()
|
||||||
|
|
||||||
if not path.isdir(SOURCE_DIR) or not listdir(SOURCE_DIR):
|
|
||||||
shutil.copytree(FALLBACK_SOURCE_DIR, SOURCE_DIR)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if not path.isdir(SOURCE_DIR) or not listdir(SOURCE_DIR):
|
||||||
|
shutil.copytree(FALLBACK_SOURCE_DIR, SOURCE_DIR)
|
||||||
|
|
||||||
if futures:
|
if futures:
|
||||||
with futures.ThreadPoolExecutor(16) as executor:
|
with futures.ThreadPoolExecutor(16) as executor:
|
||||||
executor.map(update, PLUGINS.splitlines())
|
executor.map(update, PLUGINS.splitlines())
|
||||||
|
Reference in New Issue
Block a user