mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 05:19:40 +02:00
some cleaning
This commit is contained in:
parent
21b058c3e9
commit
c021dc3a63
1 changed files with 2 additions and 1 deletions
|
@ -33,7 +33,7 @@ for device in iter(monitor.poll, None):
|
||||||
if 'ID_FS_TYPE' in device:
|
if 'ID_FS_TYPE' in device:
|
||||||
if device.action == 'add':
|
if device.action == 'add':
|
||||||
if device.device_node[5:7] == 'sd' and device.get('DEVTYPE')=='partition':
|
if device.device_node[5:7] == 'sd' and device.get('DEVTYPE')=='partition':
|
||||||
printInfo(device)
|
#printInfo(device)
|
||||||
print("New device {}".format(device.device_node))
|
print("New device {}".format(device.device_node))
|
||||||
# loop until device is mounted
|
# loop until device is mounted
|
||||||
if autoMount:
|
if autoMount:
|
||||||
|
@ -56,6 +56,7 @@ for device in iter(monitor.poll, None):
|
||||||
if device.device_node[5:7] == 'sd' and device.get('DEVTYPE')=='partition':
|
if device.device_node[5:7] == 'sd' and device.get('DEVTYPE')=='partition':
|
||||||
print('Device removed')
|
print('Device removed')
|
||||||
if not autoMount:
|
if not autoMount:
|
||||||
|
print("unmount device /media/box")
|
||||||
res = os.system("pumount /media/box")
|
res = os.system("pumount /media/box")
|
||||||
print("Return type: ", res)
|
print("Return type: ", res)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue