Skip to content

Commit 85ffb2d

Browse files
committed
fix: delete temporary folders locally only if they exist
1 parent f05b4b6 commit 85ffb2d

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

ludwig/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
__version__ = '4.0.1'
3+
__version__ = '4.0.2'
44

55

66
def print_ludwig(s):

ludwig/__main__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,9 @@ def submit():
263263

264264
# temporary runs folder auto-created with name = {project_name}_runs must be removed
265265
path_tmp = cwd / f'{src_path.name}_runs'
266-
shutil.rmtree(path_tmp)
267-
print(f'Removed temporary directory {path_tmp}')
266+
if path_tmp.exists():
267+
shutil.rmtree(path_tmp)
268+
print(f'Removed temporary directory {path_tmp}')
268269

269270
# if running on Ludwig, save worker instructions to shared drive
270271
else:

0 commit comments

Comments
 (0)