mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Kobo driver: Handle missing firmware version file
This commit is contained in:
parent
90ab2881e0
commit
eb3d1aa424
@ -78,9 +78,13 @@ class KOBO(USBMS):
|
||||
else self._main_prefix
|
||||
|
||||
# Determine the firmware version
|
||||
f = open(self.normalize_path(self._main_prefix + '.kobo/version'), 'r')
|
||||
try:
|
||||
with open(self.normalize_path(self._main_prefix + '.kobo/version'),
|
||||
'rb') as f:
|
||||
self.fwversion = f.readline().split(',')[2]
|
||||
f.close()
|
||||
except:
|
||||
self.fwversion = 'unknown'
|
||||
|
||||
if self.fwversion != '1.0' and self.fwversion != '1.4':
|
||||
self.has_kepubs = True
|
||||
debug_print('Version of firmware: ', self.fwversion, 'Has kepubs:', self.has_kepubs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user