27 lines
579 B
Python
Executable file
27 lines
579 B
Python
Executable file
#!/usr/bin/env python3
|
|
"""WizardKit: Unmount Backup Shares"""
|
|
# vim: sts=2 sw=2 ts=2
|
|
|
|
import wk
|
|
|
|
|
|
# Functions
|
|
def main() -> None:
|
|
"""Attempt to mount backup shares and print report."""
|
|
wk.ui.cli.print_info('Unmounting Backup Shares')
|
|
report = wk.net.unmount_backup_shares()
|
|
for line in report:
|
|
color = 'GREEN'
|
|
line = f' {line}'
|
|
if 'Not mounted' in line:
|
|
color = 'YELLOW'
|
|
print(wk.ui.ansi.color_string(line, color))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
main()
|
|
except SystemExit:
|
|
raise
|
|
except: # noqa: E722
|
|
wk.ui.cli.major_exception()
|