mirror of
https://github.com/beetbox/beets.git
synced 2026-01-10 01:50:34 +01:00
catch ReadError when calling item.read()
This commit is contained in:
parent
071a5c363d
commit
28556a0c37
3 changed files with 8 additions and 2 deletions
|
|
@ -58,6 +58,10 @@ def albums_in_dir(path):
|
|||
log.warn(u'unreadable file: {0}'.format(
|
||||
displayable_path(filename))
|
||||
)
|
||||
except library.ReadError as exc:
|
||||
log.error(u'error reading {0}: {1}'.format(
|
||||
displayable_path(filename), exc
|
||||
))
|
||||
else:
|
||||
items.append(i)
|
||||
|
||||
|
|
|
|||
|
|
@ -903,7 +903,7 @@ def update_items(lib, query, album, move, pretend):
|
|||
# Read new data.
|
||||
try:
|
||||
item.read()
|
||||
except Exception as exc:
|
||||
except library.ReadError as exc:
|
||||
log.error(u'error reading {0}: {1}'.format(
|
||||
displayable_path(item.path), exc))
|
||||
continue
|
||||
|
|
@ -1238,7 +1238,7 @@ def write_items(lib, query, pretend):
|
|||
# Get an Item object reflecting the "clean" (on-disk) state.
|
||||
try:
|
||||
clean_item = library.Item.from_path(item.path)
|
||||
except Exception as exc:
|
||||
except library.ReadError as exc:
|
||||
log.error(u'error reading {0}: {1}'.format(
|
||||
displayable_path(item.path), exc
|
||||
))
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ Fixes:
|
|||
content type. Thanks to Lee Reinhardt.
|
||||
* :doc:`/plugins/convert`: The ``--keep-new`` flag now works correctly
|
||||
and the library includes the converted item.
|
||||
* The importer now logs a message instead of crashing when errors occur while
|
||||
opening the files to be imported.
|
||||
|
||||
|
||||
1.3.4 (April 5, 2014)
|
||||
|
|
|
|||
Loading…
Reference in a new issue