From d7f84466a69c01770ed41b8563036aa2c7594624 Mon Sep 17 00:00:00 2001 From: Jakob Cornell Date: Mon, 18 Apr 2022 19:32:23 -0500 Subject: [PATCH] Verify tool: fix SQL parameter type bug --- disk_jumble/src/disk_jumble/verify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/disk_jumble/src/disk_jumble/verify.py b/disk_jumble/src/disk_jumble/verify.py index df6b5f3..10d71ba 100644 --- a/disk_jumble/src/disk_jumble/verify.py +++ b/disk_jumble/src/disk_jumble/verify.py @@ -348,12 +348,13 @@ def _do_verify(conn, disk_id: int, target_ranges: Optional[List[range]], disk_fi ts = dt.datetime.now(dt.timezone.utc) for result in merge_results(generate_results()): if isinstance(result, Pass): + pg_block_ranges = [NumericRange(r.start, r.stop) for r in result.blocks] cursor.execute( """ insert into diskjumble.verify_pass (verify_pass_id, at, disk_id, disk_sectors) values (default, %s, %s, %s) """, - (ts, disk_id, result.blocks) + (ts, disk_id, pg_block_ranges) ) else: assert isinstance(result, Fail) -- 2.30.2