mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
PRS505/700: Dont fail to detect the device if SD card is buggy
This commit is contained in:
parent
bc4b6fdf48
commit
83bc5c8096
@ -248,6 +248,7 @@ class PRS505(Device):
|
||||
time.sleep(3)
|
||||
self.open_osx()
|
||||
if self._card_prefix is not None:
|
||||
try:
|
||||
cachep = os.path.join(self._card_prefix, self.CACHE_XML)
|
||||
if not os.path.exists(cachep):
|
||||
os.makedirs(os.path.dirname(cachep), mode=0777)
|
||||
@ -257,6 +258,10 @@ class PRS505(Device):
|
||||
</cache>
|
||||
'''.encode('utf8'))
|
||||
f.close()
|
||||
except:
|
||||
self._card_prefix = None
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
def set_progress_reporter(self, pr):
|
||||
self.report_progress = pr
|
||||
|
Loading…
x
Reference in New Issue
Block a user