mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Disable libusb/libmtp on OS X
This commit is contained in:
parent
ae73428839
commit
e6af33d5e9
@ -27,7 +27,8 @@ def fingerprint(d):
|
||||
|
||||
class MTP_DEVICE(MTPDeviceBase):
|
||||
|
||||
supported_platforms = ['linux', 'osx']
|
||||
# libusb(x) does not work on OS X. So no MTP support for OS X
|
||||
supported_platforms = ['linux']
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
MTPDeviceBase.__init__(self, *args, **kwargs)
|
||||
|
@ -292,7 +292,15 @@ if islinux:
|
||||
|
||||
libusb_scanner = LibUSBScanner()
|
||||
if isosx:
|
||||
osx_scanner = libusb_scanner
|
||||
# Apparently libusb causes mem leaks on some Macs and hangs on others and
|
||||
# works on a few. OS X users will just have to live without MTP support.
|
||||
# See https://bugs.launchpad.net/calibre/+bug/1044706
|
||||
# See https://bugs.launchpad.net/calibre/+bug/1044758
|
||||
# osx_scanner = libusb_scanner
|
||||
usbobserver, usbobserver_err = plugins['usbobserver']
|
||||
if usbobserver is None:
|
||||
raise RuntimeError('Failed to load usbobserver: %s'%usbobserver_err)
|
||||
osx_scanner = usbobserver.get_usb_devices
|
||||
|
||||
if isfreebsd:
|
||||
freebsd_scanner = FreeBSDScanner()
|
||||
|
Loading…
x
Reference in New Issue
Block a user