Site
Gitweb
Static
projects
/
eros.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68e3919
)
Verify: convert block size assertion to warning
author
Jakob Cornell
<jakob+gpg@jcornell.net>
Fri, 17 Jun 2022 02:35:40 +0000
(21:35 -0500)
committer
Jakob Cornell
<jakob+gpg@jcornell.net>
Fri, 17 Jun 2022 02:35:40 +0000
(21:35 -0500)
disk_jumble/src/disk_jumble/verify.py
patch
|
blob
|
history
diff --git
a/disk_jumble/src/disk_jumble/verify.py
b/disk_jumble/src/disk_jumble/verify.py
index db1bcdcbcf5c12d44032865cedb635e6585494b2..2ed32f245d2bc475231c590aef185cdd38333398 100644
(file)
--- a/
disk_jumble/src/disk_jumble/verify.py
+++ b/
disk_jumble/src/disk_jumble/verify.py
@@
-1,6
+1,7
@@
from __future__ import annotations
from dataclasses import dataclass
from typing import Iterator, List, Optional
+from warnings import warn
import argparse
import contextlib
import hashlib
@@
-125,7
+126,8
@@
def _get_v1_worklist(conn, disk_id: int, target_ranges: List[NumericRange]) -> L
]
for i in infos:
- assert i.piece_length % BLOCK_SIZE == 0, f"entity {i.id.hex()} has invalid piece length"
+ if i.piece_length % BLOCK_SIZE != 0:
+ warn(f"entity {i.id.hex()} has invalid piece length")
runs = []
cursor = conn.cursor()