Added warning if no disks detected.

This commit is contained in:
2Shirt 2019-01-02 17:05:08 -07:00
parent a9c5c1c274
commit 6340bceb11
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -1010,6 +1010,10 @@ def run_hw_tests(state):
f = v['Function']
for test_obj in v['Objects']:
f(state, test_obj)
if not v['Objects']:
# No devices available
v['Objects'].append(TestObj(dev=None, label=''))
v['Objects'][-1].update_status('N/A')
except GenericAbort:
# Cleanup
tmux_kill_pane(*state.panes.values())
@ -1593,6 +1597,9 @@ def show_results(state):
for disk in state.disks:
show_report(disk.generate_disk_report(), log_report=True)
print_standard(' ')
if not state.disks:
print_warning('No devices')
print_standard(' ')
# Update progress
update_progress_pane(state)