Skip to content

Commit

Permalink
Add --skip-parent argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Schamper committed Sep 17, 2023
1 parent a61e3b1 commit e87a5ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions acquire/acquire.py
Original file line number Diff line number Diff line change
Expand Up @@ -2250,11 +2250,13 @@ def acquire_children_and_targets(target: Target, args: argparse.Namespace) -> No

log.info("")

try:
files = acquire_target(target, args, args.start_time)
except Exception:
log.exception("Failed to acquire target")
raise
files = []
if (args.children and not args.skip_parent) or not args.children:
try:
files.extend(acquire_target(target, args, args.start_time))
except Exception:
log.exception("Failed to acquire target")
raise

if args.children:
for child in target.list_children():
Expand Down
1 change: 1 addition & 0 deletions acquire/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def create_argument_parser(profiles: dict, modules: dict) -> argparse.ArgumentPa
action="store_true",
help="collect all children in addition to main target",
)
parser.add_argument("--skip-parent", action="store_true", help="skip parent collection (when using --children)")

parser.add_argument(
"--force-fallback",
Expand Down

0 comments on commit e87a5ed

Please sign in to comment.