mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix typo causing double open of cover files when reading covers from the library
This commit is contained in:
parent
5b1d5c5a81
commit
902aeaaa21
@ -1304,11 +1304,11 @@ class DB(object):
|
|||||||
f = lopen(path, 'rb')
|
f = lopen(path, 'rb')
|
||||||
except (IOError, OSError):
|
except (IOError, OSError):
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
try:
|
try:
|
||||||
f = lopen(path, 'rb')
|
f = lopen(path, 'rb')
|
||||||
except (IOError, OSError) as e:
|
except (IOError, OSError) as e:
|
||||||
# Ensure the path that caused this error is reported
|
# Ensure the path that caused this error is reported
|
||||||
raise Exception('Failed to open %r with error: %s' % (path, e))
|
raise Exception('Failed to open %r with error: %s' % (path, e))
|
||||||
|
|
||||||
with f:
|
with f:
|
||||||
if hasattr(dest, 'write'):
|
if hasattr(dest, 'write'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user