From 6340bceb118736e8294dabfbe67b806c9d1ec89a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 2 Jan 2019 17:05:08 -0700 Subject: [PATCH] Added warning if no disks detected. --- .bin/Scripts/functions/hw_diags.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 1b1d2ae5..202be76d 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -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)