mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
a19f8999cc
commit
64a2cbc4e0
@ -190,6 +190,7 @@ class MTP_DEVICE(MTPDeviceBase):
|
|||||||
if len(storage) > 2:
|
if len(storage) > 2:
|
||||||
self._cardb_id = storage[2]['id']
|
self._cardb_id = storage[2]['id']
|
||||||
|
|
||||||
|
try:
|
||||||
files, errs = self.dev.get_filelist(self)
|
files, errs = self.dev.get_filelist(self)
|
||||||
if errs and not files:
|
if errs and not files:
|
||||||
raise OpenFailed('Failed to read files from device. Underlying errors:\n'
|
raise OpenFailed('Failed to read files from device. Underlying errors:\n'
|
||||||
@ -199,6 +200,9 @@ class MTP_DEVICE(MTPDeviceBase):
|
|||||||
raise OpenFailed('Failed to read folders from device. Underlying errors:\n'
|
raise OpenFailed('Failed to read folders from device. Underlying errors:\n'
|
||||||
+self.format_errorstack(errs))
|
+self.format_errorstack(errs))
|
||||||
self.filesystem_cache = FilesystemCache(files, folders)
|
self.filesystem_cache = FilesystemCache(files, folders)
|
||||||
|
except:
|
||||||
|
self.dev = self._main_id = self._carda_id = self._cardb_id = None
|
||||||
|
raise
|
||||||
|
|
||||||
@synchronous
|
@synchronous
|
||||||
def get_device_information(self, end_session=True):
|
def get_device_information(self, end_session=True):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user