Config: Add diagnostic to paths_buf assert
The bare assert (len(paths_buf)) relies on truthiness which, while correct, is misleading — readers might expect "assert len(paths_buf) > 0" instead. Replace with an explicit comparison and add a diagnostic message showing the actual length for easier debugging. Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
8a7bcfba8e
commit
1f3e38e685
1 changed files with 2 additions and 1 deletions
|
|
@ -43,7 +43,8 @@ class Config(): # export
|
|||
slog(DEBUG, 'Reading config "{}"'.format(f))
|
||||
paths_buf = []
|
||||
tree = serdes.read(f, paths_buf = paths_buf)
|
||||
assert (len(paths_buf))
|
||||
assert len(paths_buf) > 0, \
|
||||
f'Expected at least one path in paths_buf, got {len(paths_buf)}'
|
||||
if refuse_mode_mask is not None:
|
||||
for p in paths_buf:
|
||||
st = os.stat(p)
|
||||
|
|
|
|||
Loading…
Reference in a new issue