Verify tool: fix cursor reuse bug
authorJakob Cornell <jakob+gpg@jcornell.net>
Fri, 22 Apr 2022 06:17:33 +0000 (01:17 -0500)
committerJakob Cornell <jakob+gpg@jcornell.net>
Fri, 22 Apr 2022 06:17:33 +0000 (01:17 -0500)
disk_jumble/src/disk_jumble/verify.py

index c52ebbbd8110134eaf7be978b8d8ac97097be9fb..4cd7939b5aa0f701ffb4417bffd6e54f5e721838 100644 (file)
@@ -129,6 +129,7 @@ def _get_v1_worklist(conn, disk_id: int, target_ranges: List[NumericRange]) -> L
                assert i.piece_length % BLOCK_SIZE == 0, f"entity {i.id.hex()} has invalid piece length"
 
        runs = []
+       cursor = conn.cursor()
        for info in infos:
                cursor.execute(
                        """