mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-06 03:13:43 +02:00
This commit is contained in:
parent
20e8cd127d
commit
ef5cce0e0b
2 changed files with 3 additions and 4 deletions
|
|
@ -12,7 +12,6 @@
|
|||
## 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.,
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
from libprs500.devices import libusb
|
||||
|
||||
### End point description for PRS-500 procductId=667
|
||||
### Endpoint Descriptor:
|
||||
|
|
@ -227,7 +226,7 @@ def is_connected(cls, helper=None):
|
|||
"""
|
||||
try:
|
||||
return get_device_by_id(cls.VENDOR_ID, cls.PRODUCT_ID) != None
|
||||
except libusb.Error:
|
||||
except USBError:
|
||||
return False
|
||||
|
||||
def set_progress_reporter(self, report_progress):
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
from libprs500.devices.prs500.books import BookList, fix_ids
|
||||
from libprs500 import iswindows, islinux, isosx
|
||||
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
|
||||
|
||||
class File(object):
|
||||
|
|
@ -117,7 +117,7 @@ def is_connected(cls, helper=None):
|
|||
else:
|
||||
try:
|
||||
return get_device_by_id(cls.VENDOR_ID, cls.PRODUCT_ID) != None
|
||||
except libusb.Error:
|
||||
except USBError:
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue