mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #4278 (Kinde 2 international not detected on Macos 10.6.2)
This commit is contained in:
parent
2682d46cf7
commit
336e425537
@ -323,8 +323,14 @@ class Device(DeviceConfig, DevicePlugin):
|
|||||||
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'
|
||||||
return subprocess.Popen((ioreg+' -w 0 -S -c IOMedia').split(),
|
cmd = (ioreg+' -w 0 -S -c IOMedia').split()
|
||||||
stdout=subprocess.PIPE).communicate()[0]
|
for i in range(3):
|
||||||
|
try:
|
||||||
|
return subprocess.Popen(cmd,
|
||||||
|
stdout=subprocess.PIPE).communicate()[0]
|
||||||
|
except IOError: # Probably an interrupted system call
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def osx_sort_names(self, names):
|
def osx_sort_names(self, names):
|
||||||
return names
|
return names
|
||||||
|
Loading…
x
Reference in New Issue
Block a user