From: Jakob Cornell Date: Tue, 19 Apr 2022 01:40:02 +0000 (-0500) Subject: Fix bug in verify output code X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=bfadb1bae25c1c3f8fc340428912a577d3618ddf;p=eros.git Fix bug in verify output code --- diff --git a/disk_jumble/src/disk_jumble/verify.py b/disk_jumble/src/disk_jumble/verify.py index 10d71ba..66cb3fa 100644 --- a/disk_jumble/src/disk_jumble/verify.py +++ b/disk_jumble/src/disk_jumble/verify.py @@ -348,13 +348,12 @@ 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, pg_block_ranges) + (ts, disk_id, NumericRange(result.blocks.start, result.blocks.stop)) ) else: assert isinstance(result, Fail)