mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-03 19:17:02 -05: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
 | 
			
		||||
##    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 @@ class PRS500(Device):
 | 
			
		||||
        """
 | 
			
		||||
        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.errors import DeviceError, FreeSpaceError
 | 
			
		||||
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 @@ class PRS505(Device):
 | 
			
		||||
        else:
 | 
			
		||||
            try:
 | 
			
		||||
                return get_device_by_id(cls.VENDOR_ID, cls.PRODUCT_ID) != None
 | 
			
		||||
            except libusb.Error:
 | 
			
		||||
            except USBError:
 | 
			
		||||
                return False                
 | 
			
		||||
        
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user