Skip to content

Commit

Permalink
Handle potential OSError when unlinking temporary files in ArtResizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Blank committed Feb 4, 2025
1 parent 731519b commit 1b94bac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion beets/util/artresizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,10 @@ def reformat(self, path_in, new_format, deinterlaced=True):
)
finally:
if result_path != path_in:
os.unlink(path_in)
try:
os.unlink(path_in)
except OSError:
pass
return result_path

@property
Expand Down

0 comments on commit 1b94bac

Please sign in to comment.