From 902aeaaa21e8a945164e8a8b84a520f250362b14 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 30 Apr 2015 09:10:33 +0530 Subject: [PATCH] Fix typo causing double open of cover files when reading covers from the library --- src/calibre/db/backend.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/calibre/db/backend.py b/src/calibre/db/backend.py index 1f25eae6b1..bb4ef5e18b 100644 --- a/src/calibre/db/backend.py +++ b/src/calibre/db/backend.py @@ -1304,11 +1304,11 @@ class DB(object): f = lopen(path, 'rb') except (IOError, OSError): time.sleep(0.2) - try: - f = lopen(path, 'rb') - except (IOError, OSError) as e: - # Ensure the path that caused this error is reported - raise Exception('Failed to open %r with error: %s' % (path, e)) + try: + f = lopen(path, 'rb') + except (IOError, OSError) as e: + # Ensure the path that caused this error is reported + raise Exception('Failed to open %r with error: %s' % (path, e)) with f: if hasattr(dest, 'write'):