mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 03:53:44 +02:00
Fix #910378 (save to disk results in error)
This commit is contained in:
commit
632a5e7577
1 changed files with 9 additions and 1 deletions
|
|
@ -828,7 +828,15 @@ def get_file(self, path, outfile, end_session=True):
|
|||
if DEBUG:
|
||||
logger().info("ITUNES.get_file(): exporting '%s'" % path)
|
||||
|
||||
outfile.write(open(self.cached_books[path]['lib_book'].location().path).read())
|
||||
try:
|
||||
outfile.write(open(self.cached_books[path]['lib_book'].location().path).read())
|
||||
except:
|
||||
# Clean up
|
||||
logger().info(" unable to extract books from iDevices")
|
||||
logger().info(" deleting empty ", outfile.name)
|
||||
outfile.close()
|
||||
os.remove(outfile.name)
|
||||
raise UserFeedback("Unable to extract books from iDevices", details=None, level=UserFeedback.WARN)
|
||||
|
||||
def open(self, connected_device, library_uuid):
|
||||
'''
|
||||
|
|
|
|||
Loading…
Reference in a new issue