Fix calibre holding file handles on the Cybook, preventing it from being ejected

This commit is contained in:
Kovid Goyal 2009-03-01 15:27:40 -08:00
parent 5247233b4b
commit 8b18917435

View File

@ -39,7 +39,7 @@ def metadata_from_formats(formats):
return mi2
for path, ext in zip(formats, extensions):
stream = open(path, 'rb')
with open(path, 'rb') as stream:
try:
mi.smart_update(get_metadata(stream, stream_type=ext, use_libprs_metadata=True))
except: