mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-28 00:33:34 +02:00
Fix #278
This commit is contained in:
parent
2d0e0707a6
commit
e6bfd5f1d5
2 changed files with 10 additions and 1 deletions
|
|
@ -97,6 +97,8 @@ class PRS500(Device):
|
|||
|
||||
VENDOR_ID = 0x054c #: SONY Vendor Id
|
||||
PRODUCT_ID = 0x029b #: Product Id for the PRS-500
|
||||
PRODUCT_NAME = 'PRS-500'
|
||||
VENDOR_NAME = 'SONY'
|
||||
INTERFACE_ID = 0 #: The interface we use to talk to the device
|
||||
BULK_IN_EP = 0x81 #: Endpoint for Bulk reads
|
||||
BULK_OUT_EP = 0x02 #: Endpoint for Bulk writes
|
||||
|
|
|
|||
|
|
@ -55,7 +55,14 @@ def get_devices(self):
|
|||
return linux_scanner()
|
||||
|
||||
def scan(self):
|
||||
self.devices = self.get_devices()
|
||||
try: # Windows WMI occassionally and temporarily barfs
|
||||
self.devices = self.get_devices()
|
||||
except Exception, e:
|
||||
if not iswindows:
|
||||
raise e
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
def is_device_connected(self, device):
|
||||
if iswindows:
|
||||
|
|
|
|||
Loading…
Reference in a new issue