diff --git a/scripts/wk/net.py b/scripts/wk/net.py index 14b5fc0e..4e56ad32 100644 --- a/scripts/wk/net.py +++ b/scripts/wk/net.py @@ -88,11 +88,15 @@ def mount_backup_shares(read_write: bool = False) -> list[str]: continue # Mount share - proc = mount_network_share(details, mount_point, read_write=read_write) - if proc.returncode: + try: + proc = mount_network_share(details, mount_point, read_write=read_write) + if proc.returncode: + report.append(f'Failed to Mount {mount_str}') + else: + report.append(f'Mounted {mount_str}') + except RuntimeError: + # Assuming we're not connected to a network? report.append(f'Failed to Mount {mount_str}') - else: - report.append(f'Mounted {mount_str}') # Done return report