mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:...
This commit is contained in:
parent
3ffa6bb88f
commit
1fa831703d
@ -188,8 +188,8 @@ class Device(_Device):
|
|||||||
if not drives:
|
if not drives:
|
||||||
raise DeviceError(_('Unable to detect the %s disk drive. Try rebooting.') % self.__class__.__name__)
|
raise DeviceError(_('Unable to detect the %s disk drive. Try rebooting.') % self.__class__.__name__)
|
||||||
|
|
||||||
self._main_prefix = drives['main'] if 'main' in names.keys() else None
|
self._main_prefix = drives.get('main', None)
|
||||||
self._card_prefix = drives['card'] if 'card' in names.keys() else None
|
self._card_prefix = drives.get('card', None)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_osx_mountpoints(self, raw=None):
|
def get_osx_mountpoints(self, raw=None):
|
||||||
@ -197,7 +197,8 @@ class Device(_Device):
|
|||||||
ioreg = '/usr/sbin/ioreg'
|
ioreg = '/usr/sbin/ioreg'
|
||||||
if not os.access(ioreg, os.X_OK):
|
if not os.access(ioreg, os.X_OK):
|
||||||
ioreg = 'ioreg'
|
ioreg = 'ioreg'
|
||||||
raw = subprocess.Popen((ioreg+' -w 0 -S -c IOMedia').split(), stdout=subprocess.PIPE).stdout.read()
|
raw = subprocess.Popen((ioreg+' -w 0 -S -c IOMedia').split(),
|
||||||
|
stdout=subprocess.PIPE).stdout.read()
|
||||||
lines = raw.splitlines()
|
lines = raw.splitlines()
|
||||||
names = {}
|
names = {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user