def __init__(self, *args, **kwargs): MTPDeviceBase.__init__(self, *args, **kwargs) self.libmtp = None self.known_devices = None self.detect_cache = {} self.dev = None self._filesystem_cache = None self.lock = RLock() self.blacklisted_devices = set() self.ejected_devices = set() self.currently_connected_dev = None self._is_device_mtp = None if islinux: from calibre.devices.mtp.unix.sysfs import MTPDetect self._is_device_mtp = MTPDetect()
def __init__(self, *args, **kwargs): MTPDeviceBase.__init__(self, *args, **kwargs) self.libmtp = None self.known_devices = None self.detect_cache = {} self.dev = None self._filesystem_cache = None self.lock = RLock() self.blacklisted_devices = set() self.ejected_devices = set() self.currently_connected_dev = None self._is_device_mtp = None if islinux: from calibre.devices.mtp.unix.sysfs import MTPDetect self._is_device_mtp = MTPDetect() if ismacos and 'osx' in self.supported_platforms: from calibre_extensions import usbobserver self.usbobserver = usbobserver self._is_device_mtp = self.osx_is_device_mtp
def __init__(self, *args, **kwargs): MTPDeviceBase.__init__(self, *args, **kwargs) self.libmtp = None self.known_devices = None self.detect_cache = {} self.dev = None self._filesystem_cache = None self.lock = RLock() self.blacklisted_devices = set() self.ejected_devices = set() self.currently_connected_dev = None self._is_device_mtp = None if islinux: from calibre.devices.mtp.unix.sysfs import MTPDetect self._is_device_mtp = MTPDetect() if isosx and 'osx' in self.supported_platforms: self.usbobserver, err = plugins['usbobserver'] if err: raise RuntimeError(err) self._is_device_mtp = self.osx_is_device_mtp