mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #910378 (save to disk results in error)
This commit is contained in:
commit
632a5e7577
@ -828,7 +828,15 @@ class ITUNES(DriverBase):
|
|||||||
if DEBUG:
|
if DEBUG:
|
||||||
logger().info("ITUNES.get_file(): exporting '%s'" % path)
|
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):
|
def open(self, connected_device, library_uuid):
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user