mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2025-10-23 23:07:47 -04:00
Catch FileNotFoundError due to undownloaded ebooks
This commit is contained in:
parent
ef67dbd204
commit
7e374cee3e
1 changed files with 5 additions and 1 deletions
|
|
@ -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'))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue