예제 #1
0
 def eject_linux(self):
     from calibre.devices.udisks import eject, umount
     drives = [d for d in self.find_device_nodes() if d]
     for d in drives:
         try:
             umount(d)
         except:
             pass
     for d in drives:
         try:
             eject(d)
         except Exception as e:
             print('Udisks eject call for:', d, 'failed:')
             print('\t', e)
예제 #2
0
파일: device.py 프로젝트: mching/calibre
 def eject_linux(self):
     from calibre.devices.udisks import eject, umount
     drives = [d for d in self.find_device_nodes() if d]
     for d in drives:
         try:
             umount(d)
         except:
             pass
     for d in drives:
         try:
             eject(d)
         except Exception as e:
             print 'Udisks eject call for:', d, 'failed:'
             print '\t', e