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':