Skip to content

Commit f3ea4ba

Browse files
committed
Fix zip files causing silent error on bad symlink
1 parent 12722e1 commit f3ea4ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ def zip_files(zip_file_name, *args, **kwargs):
128128
except ValueError:
129129
os.utime(file_loc, None)
130130
zip_file.write(file_loc)
131+
except FileNotFoundError:
132+
pass
131133
for direc in dirs:
132134
dir_loc = os.path.relpath(path_join(root, direc), directory)
133135
if verbose:
@@ -137,6 +139,8 @@ def zip_files(zip_file_name, *args, **kwargs):
137139
except ValueError:
138140
os.utime(file_loc, None)
139141
zip_file.write(file_loc)
142+
except FileNotFoundError:
143+
pass
140144

141145
else:
142146
file = os.path.abspath(arg)

0 commit comments

Comments
 (0)