mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
This commit is contained in:
parent
20e8cd127d
commit
ef5cce0e0b
@ -12,7 +12,6 @@
|
|||||||
## You should have received a copy of the GNU General Public License along
|
## You should have received a copy of the GNU General Public License along
|
||||||
## with this program; if not, write to the Free Software Foundation, Inc.,
|
## with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
from libprs500.devices import libusb
|
|
||||||
|
|
||||||
### End point description for PRS-500 procductId=667
|
### End point description for PRS-500 procductId=667
|
||||||
### Endpoint Descriptor:
|
### Endpoint Descriptor:
|
||||||
@ -227,7 +226,7 @@ class PRS500(Device):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return get_device_by_id(cls.VENDOR_ID, cls.PRODUCT_ID) != None
|
return get_device_by_id(cls.VENDOR_ID, cls.PRODUCT_ID) != None
|
||||||
except libusb.Error:
|
except USBError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def set_progress_reporter(self, report_progress):
|
def set_progress_reporter(self, report_progress):
|
||||||
|
@ -23,7 +23,7 @@ from libprs500.devices.errors import DeviceError, FreeSpaceError
|
|||||||
from libprs500.devices.prs500.books import BookList, fix_ids
|
from libprs500.devices.prs500.books import BookList, fix_ids
|
||||||
from libprs500 import iswindows, islinux, isosx
|
from libprs500 import iswindows, islinux, isosx
|
||||||
from libprs500.devices.libusb import get_device_by_id
|
from libprs500.devices.libusb import get_device_by_id
|
||||||
from libprs500.devices import libusb
|
from libprs500.devices.libusb import Error as USBError
|
||||||
from libprs500.devices.errors import PathError
|
from libprs500.devices.errors import PathError
|
||||||
|
|
||||||
class File(object):
|
class File(object):
|
||||||
@ -117,7 +117,7 @@ class PRS505(Device):
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
return get_device_by_id(cls.VENDOR_ID, cls.PRODUCT_ID) != None
|
return get_device_by_id(cls.VENDOR_ID, cls.PRODUCT_ID) != None
|
||||||
except libusb.Error:
|
except USBError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user