Avoid crash if ddrescue-tui is run offline
This commit is contained in:
parent
25b18ebabc
commit
fe21d10c98
1 changed files with 8 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue