From: Jakob Cornell Date: Tue, 19 Apr 2022 00:32:23 +0000 (-0500) Subject: Verify tool: fix SQL parameter type bug X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=d7f84466a69c01770ed41b8563036aa2c7594624;p=eros.git Verify tool: fix SQL parameter type bug --- 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)