From c71e30e4fb05879c2c5ae9ed5b460710499645fc Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 4 Jan 2020 15:58:43 -0700 Subject: [PATCH] Adjusted debug reports --- scripts/wk/hw/ddrescue.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/wk/hw/ddrescue.py b/scripts/wk/hw/ddrescue.py index 3ad91cc8..c050ac85 100644 --- a/scripts/wk/hw/ddrescue.py +++ b/scripts/wk/hw/ddrescue.py @@ -36,7 +36,7 @@ Usage: Options: -h --help Show this page -s --dry-run Print commands to be used instead of running them - --force-local-map Skip mounting shares and save map to current dir + --force-local-map Skip mounting shares and save map to local drive --start-fresh Ignore previous runs and start new recovery ''' CLONE_SETTINGS = { @@ -841,12 +841,16 @@ class State(): # State (self) with open(f'{debug_dir}/state.report', 'a') as _f: + _f.write('[Debug report]\n') _f.write('\n'.join(debug.generate_object_report(self))) + _f.write('\n') # Block pairs for _bp in self.block_pairs: - with open(f'{debug_dir}/bp_part#.report', 'a') as _f: + with open(f'{debug_dir}/block_pairs.report', 'a') as _f: + _f.write('[Debug report]\n') _f.write('\n'.join(debug.generate_object_report(_bp))) + _f.write('\n') def save_settings(self, settings): # pylint: disable=no-self-use @@ -1794,7 +1798,6 @@ def run_recovery(state, main_menu, settings_menu, dry_run=True): try: run_ddrescue(state, pair, pass_name, settings, dry_run=dry_run) except (KeyboardInterrupt, std.GenericAbort): - LOG.warning('User stopped recovery (2)') abort = True break