From bed7e797584f82dddbec118282ed1c712f8a03c7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 9 Apr 2021 04:13:19 -0600 Subject: [PATCH] Add questionable argument to hw-diags I, the author of this script, strongly recommend against using this! References issue #139 --- scripts/wk/hw/diags.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/wk/hw/diags.py b/scripts/wk/hw/diags.py index 36d87dcb..6529844e 100644 --- a/scripts/wk/hw/diags.py +++ b/scripts/wk/hw/diags.py @@ -27,9 +27,15 @@ Usage: hw-diags (-h | --help) Options: - -c --cli Force CLI mode - -h --help Show this page - -q --quick Skip menu and perform a quick check + -c --cli Force CLI mode + -h --help Show this page + -q --quick Skip menu and perform a quick check + + --ignore-smart-errors NOT RECOMMENDED! + Only use if you have RTFM, + know what you're doing, + understand the risks, + and accept responsibililty. ''' LOG = logging.getLogger(__name__) BADBLOCKS_REGEX = re.compile( @@ -250,7 +256,7 @@ class State(): disk.tests['Disk I/O Benchmark'].disabled = True # Disable tests if necessary - if disable_tests: + if disable_tests and not self.override_all_smart_errors: disk.disable_disk_tests() # Wait for self-test(s) @@ -1265,6 +1271,7 @@ def main(): atexit.register(tmux.kill_all_panes) menu = build_menu(cli_mode=args['--cli'], quick_mode=args['--quick']) state = State() + state.override_all_smart_errors = args['--ignore-smart-errors'] # pylint: disable=attribute-defined-outside-init # Quick Mode if args['--quick']: