mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix calibre holding file handles on the Cybook, preventing it from being ejected
This commit is contained in:
parent
5247233b4b
commit
8b18917435
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user