mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-21 14:29:41 +02:00
fix bug
This commit is contained in:
parent
532166cf76
commit
65cd1313f4
1 changed files with 2 additions and 2 deletions
|
@ -297,8 +297,8 @@ class PandoraBox:
|
||||||
def mount_device(self):
|
def mount_device(self):
|
||||||
"""Mount USB device"""
|
"""Mount USB device"""
|
||||||
self._log('Try to mount partition')
|
self._log('Try to mount partition')
|
||||||
self.mount_point = None
|
|
||||||
if self.has_usb_auto_mount:
|
if self.has_usb_auto_mount:
|
||||||
|
self.mount_point = None
|
||||||
loop = 0
|
loop = 0
|
||||||
while (self.mount_point is None) and (loop < 15):
|
while (self.mount_point is None) and (loop < 15):
|
||||||
# need to sleep before devide is mounted
|
# need to sleep before devide is mounted
|
||||||
|
@ -310,6 +310,7 @@ class PandoraBox:
|
||||||
if self.mount_device is None:
|
if self.mount_device is None:
|
||||||
self._log('No partition mounted')
|
self._log('No partition mounted')
|
||||||
else:
|
else:
|
||||||
|
self.mount_point = "/media/box"
|
||||||
if not os.path.exists("/media/box"):
|
if not os.path.exists("/media/box"):
|
||||||
self._log("folder /media/box does not exists")
|
self._log("folder /media/box does not exists")
|
||||||
return None
|
return None
|
||||||
|
@ -324,7 +325,6 @@ class PandoraBox:
|
||||||
loop +=1
|
loop +=1
|
||||||
continue
|
continue
|
||||||
break
|
break
|
||||||
self.mount_point = "/media/box"
|
|
||||||
|
|
||||||
def umount_device(self):
|
def umount_device(self):
|
||||||
"""Unmount USB device"""
|
"""Unmount USB device"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue