mirror of
https://github.com/beetbox/beets.git
synced 2026-01-20 15:14:13 +01:00
refactor: suppress OSError when unlinking temporary files in ArtResizer
This commit is contained in:
parent
9972041e4b
commit
e85f67ac7b
1 changed files with 2 additions and 3 deletions
|
|
@ -21,6 +21,7 @@ import os.path
|
|||
import platform
|
||||
import re
|
||||
import subprocess
|
||||
from contextlib import suppress
|
||||
from itertools import chain
|
||||
from urllib.parse import urlencode
|
||||
|
||||
|
|
@ -660,10 +661,8 @@ class ArtResizer(metaclass=Shareable):
|
|||
)
|
||||
finally:
|
||||
if result_path != path_in:
|
||||
try:
|
||||
with suppress(OSError):
|
||||
os.unlink(path_in)
|
||||
except OSError:
|
||||
pass
|
||||
return result_path
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Reference in a new issue