Compare commits

...

2 Commits

Author SHA1 Message Date
precondition
7f5a979562 Merge 7e374cee3e into ef67dbd204 2023-08-10 09:15:10 +00:00
precondition
7e374cee3e Catch FileNotFoundError due to undownloaded ebooks 2023-08-10 11:09:49 +02:00

View File

@@ -374,7 +374,11 @@ class InterfacePluginAction(InterfaceAction):
result['success'] = False
result['fileobj'] = None
zin = zipfile.ZipFile(book.filename, 'r')
try:
zin = zipfile.ZipFile(book.filename, 'r')
except FileNotFoundError:
print(_("File not found. Make sure that the ebook has been properly downloaded in the Kobo app. ("), book.filename, _(")"))
return result
#print ('Kobo library filename: {0}'.format(book.filename))
for userkey in self.userkeys:
print (_('Trying key: '), codecs.encode(userkey, 'hex'))