mirror of
https://github.com/beetbox/beets.git
synced 2026-02-22 15:22:42 +01:00
More error handling
This commit is contained in:
parent
2e2a3bf223
commit
a4b4df8b12
1 changed files with 6 additions and 2 deletions
|
|
@ -122,8 +122,12 @@ class EmbedCoverArtPlugin(BeetsPlugin):
|
|||
except OSError as e:
|
||||
self._log.error("Error: {}".format(e))
|
||||
if img.format:
|
||||
with open('temp.jpg', 'wb') as f:
|
||||
f.write(response.content)
|
||||
try:
|
||||
with open('temp.jpg', 'wb') as f:
|
||||
f.write(response.content)
|
||||
except Exception as e:
|
||||
self._log.error(f"Error writing file: {e}"
|
||||
)
|
||||
opts.file = 'temp.jpg'
|
||||
items = lib.items(decargs(args))
|
||||
# Confirm with user.
|
||||
|
|
|
|||
Loading…
Reference in a new issue