(self, mountPath)
| 193 | self.stopThread = True |
| 194 | |
| 195 | def eject(self, mountPath): |
| 196 | |
| 197 | retries = 5 |
| 198 | timeout = 3 |
| 199 | |
| 200 | ejected = False |
| 201 | |
| 202 | for i in (0,retries): |
| 203 | if self._umountPartition(mountPath): |
| 204 | ejected = True |
| 205 | else: |
| 206 | time.sleep(timeout) |
| 207 | |
| 208 | if ejected: |
| 209 | self._eventManager.fire( Events.EXTERNAL_DRIVE_EJECTED, { |
| 210 | "mount_path": mountPath |
| 211 | }) |
| 212 | return {'result': True} |
| 213 | |
| 214 | return { |
| 215 | 'result': False, |
| 216 | 'error': "Unable to eject" |
| 217 | } |
nothing calls this directly
no test coverage detected