From 4e61025e995545ac3374ec0c2f0a6997e334d535 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 8 Mar 2022 13:02:33 -0700 Subject: [PATCH] Fix --sector-size argument --- scripts/wk/hw/ddrescue.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/wk/hw/ddrescue.py b/scripts/wk/hw/ddrescue.py index 0e2bebc7..fc3724dc 100644 --- a/scripts/wk/hw/ddrescue.py +++ b/scripts/wk/hw/ddrescue.py @@ -117,12 +117,14 @@ TIMEZONE = pytz.timezone(cfg.main.LINUX_TIME_ZONE) # Classes class BlockPair(): """Object for tracking source to dest recovery data.""" + # pylint: disable=too-many-instance-attributes def __init__(self, source, destination, model, working_dir): """Initialize BlockPair() NOTE: source should be a wk.hw.obj.Disk() object and destination should be a pathlib.Path() object. """ + self.sector_size = source.details.get('phy-sec', 512) self.source = source.path self.destination = destination self.map_data = {} @@ -1245,8 +1247,7 @@ def build_ddrescue_cmd(block_pair, pass_name, settings_menu): cmd.extend(get_ddrescue_settings(settings_menu)) # Add source physical sector size (if possible) - # TODO: Fix - #cmd.append(f'--sector-size={block_pair.source.details.get("phy-sec", 512)}') + cmd.append(f'--sector-size={block_pair.sector_size}') # Add block pair and map file if PLATFORM == 'Darwin':