Skip to content

Commit 33be1cf

Browse files
Update BlobExtractor argument name to blob_capture_file for consistency
1 parent 3d8cc09 commit 33be1cf

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

common_utility/capture.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ def main() -> None:
442442
args = parser.parse_args()
443443

444444
try:
445-
extractor = BlobExtractor(args.blob)
445+
extractor = BlobExtractor(args.blob_capture_file)
446446
except FileNotFoundError:
447-
print(f"error: blob file not found: {args.blob}", file=sys.stderr)
447+
print(f"error: blob file not found: {args.blob_capture_file}", file=sys.stderr)
448448
sys.exit(1)
449449
except ValueError as e:
450450
print(f"error: {e}", file=sys.stderr)
@@ -490,7 +490,7 @@ def _fmt(n: int) -> str:
490490
return f"{n / 1024 / 1024:.1f} MiB ({n} bytes)"
491491
return f"{n / 1024:.1f} KiB ({n} bytes)"
492492

493-
print(f"blob: {args.blob}")
493+
print(f"blob: {args.blob_capture_file}")
494494
print(f"magic: {MAGIC:#010x}")
495495
print(f"version: {version}")
496496
print(f"num_slots: {num_slots} (write_head={write_head})")

tests/captureTest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def test_make_capture_backend_uses_completion_handler(self, tmp_path: pathlib.Pa
522522
def _run_extract_cli(blob_path: pathlib.Path, dest: pathlib.Path, info: bool = False) -> str:
523523
"""Run the extract CLI and return captured stdout."""
524524
stdout = io.StringIO()
525-
argv = ["blob-extract", str(blob_path), str(dest)]
525+
argv = ["blob-extract", f"--blob-capture-file={str(blob_path)}", str(dest)]
526526
if info:
527527
argv.append("--info")
528528
with patch("sys.argv", argv), patch("sys.stdout", stdout), patch("sys.stderr", io.StringIO()):

0 commit comments

Comments
 (0)