Updated mount-all-volumes
* Added gui argument to open Thunar after mounting
This commit is contained in:
parent
45608e8346
commit
a01f3d04b6
2 changed files with 10 additions and 3 deletions
|
|
@ -2,6 +2,8 @@
|
|||
"""Wizard Kit: Mount all volumes"""
|
||||
# vim: sts=2 sw=2 ts=2
|
||||
|
||||
import sys
|
||||
|
||||
import wk
|
||||
|
||||
|
||||
|
|
@ -19,6 +21,11 @@ def main():
|
|||
wk.std.print_info('Results')
|
||||
wk.std.print_report(report, indent=2)
|
||||
|
||||
# GUI mode
|
||||
if 'gui' in sys.argv:
|
||||
wk.std.pause('Press Enter to exit...')
|
||||
wk.exe.popen_program(['nohup', 'thunar', '/media'])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if wk.std.PLATFORM != 'Linux':
|
||||
|
|
|
|||
|
|
@ -138,9 +138,9 @@ def mount_volumes(device_path=None, read_write=False, scan_corestorage=False):
|
|||
|
||||
# Attempt to mount volume
|
||||
if not already_mounted:
|
||||
mount(vol.path, read_write=read_write)
|
||||
proc = run_program(cmd, check=False)
|
||||
if proc.returncode:
|
||||
try:
|
||||
mount(vol.path, read_write=read_write)
|
||||
except RuntimeError:
|
||||
result += 'Failed to mount'
|
||||
report.append(std.color_string(result, 'RED'))
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in a new issue