diff --git a/src/calibre/debug.py b/src/calibre/debug.py index ac164c14ab..6714db0331 100644 --- a/src/calibre/debug.py +++ b/src/calibre/debug.py @@ -108,6 +108,11 @@ def debug_device_driver(): drives.append((str(drive.PNPDeviceID), 'No mount points found')) for drive in drives: print '\t', drive + if isosx: + from calibre.devices.usbms.device import Device + raw = Device.run_ioreg() + open('/tmp/ioreg.txt', 'wb').write(raw) + print 'ioreg output saved to /tmp/ioreg.txt' from calibre.devices import devices for dev in devices(): print 'Looking for', dev.__name__ diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py index 660953e68c..f84af1853b 100644 --- a/src/calibre/devices/usbms/device.py +++ b/src/calibre/devices/usbms/device.py @@ -205,13 +205,19 @@ class Device(_Device): self._main_prefix = drives.get('main') self._card_prefix = drives.get('card', None) + @classmethod + def run_ioreg(cls, raw=None): + if raw is not None: + return raw + ioreg = '/usr/sbin/ioreg' + if not os.access(ioreg, os.X_OK): + ioreg = 'ioreg' + return subprocess.Popen((ioreg+' -w 0 -S -c IOMedia').split(), + stdout=subprocess.PIPE).communicate()[0] + + def get_osx_mountpoints(self, raw=None): - if raw is None: - ioreg = '/usr/sbin/ioreg' - if not os.access(ioreg, os.X_OK): - ioreg = 'ioreg' - raw = subprocess.Popen((ioreg+' -w 0 -S -c IOMedia').split(), - stdout=subprocess.PIPE).communicate()[0] + raw = self.run_ioreg(raw) lines = raw.splitlines() names = {} diff --git a/upload.py b/upload.py index 6bc90aada2..d50b8759d2 100644 --- a/upload.py +++ b/upload.py @@ -399,7 +399,7 @@ class update(OptionlessCommand): ' a version update.' def run(self): - for x in ['build', 'dist', 'docs'] + \ + for x in ['build', 'dist'] + \ glob.glob(os.path.join('src', 'calibre', 'plugins', '*')): if os.path.exists(x): if os.path.isdir(x):