Skip to content

Commit 2f61bcb

Browse files
committed
add a try/except block for the extension separator code
1 parent 0771345 commit 2f61bcb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: python-standard-library/extension-separator/extension_separator.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,8 @@
6262
dst = os.path.join(path, folder_name, basename)
6363
if verbose:
6464
print(f"[*] Moving {file} to {dst}")
65-
shutil.move(file, dst)
65+
try:
66+
shutil.move(file, dst)
67+
except Exception as e:
68+
print(f"[!] Error: {e}")
69+
continue

0 commit comments

Comments
 (0)