diff --git a/acquire/acquire.py b/acquire/acquire.py index 910e28f4..1f58e1be 100644 --- a/acquire/acquire.py +++ b/acquire/acquire.py @@ -2547,7 +2547,7 @@ def acquire_children_and_targets(target: Target, args: argparse.Namespace) -> li raise if args.children: - for child in target.list_children(): + for _, child in target.list_children(): counter += 1 acquire_gui.shard = int((progress_limit / total_targets) * counter) try: diff --git a/tests/test_gui.py b/tests/test_gui.py index fee38604..441b57cd 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -13,6 +13,7 @@ from collections.abc import Iterator from dissect.target import Target + from dissect.target.helpers.record import ChildTargetRecord @pytest.mark.parametrize( @@ -34,8 +35,9 @@ def test_gui( mock_target: Target, gui: GUI, num_children: int, skip_parent: bool, auto_upload: bool, expected_shards: list[int] ) -> None: - def list_children() -> Iterator[Target]: - yield from [mock_target] * num_children + def list_children() -> Iterator[tuple[str, ChildTargetRecord]]: + # We do not use the index so just set it to zero. + yield from [("0", mock_target)] * num_children mock_target.list_children = list_children