fix: ds4 kv-janitor loop var shadowed `import threading as _t`

The --kv-disk-dir parse loop used `for _i, _t in ...`, making `_t` a local
in main() and shadowing the module-level `import threading as _t`, so the
later `_t.Thread(...)` raised UnboundLocalError and crash-looped both
engines. Renamed the loop var to `_tok`.
Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
parent ce9c2943
...@@ -365,8 +365,8 @@ def main(): ...@@ -365,8 +365,8 @@ def main():
if "--kv-disk-dir" in _extra: if "--kv-disk-dir" in _extra:
import shlex as _shlex import shlex as _shlex
_toks = _shlex.split(_extra) _toks = _shlex.split(_extra)
for _i, _t in enumerate(_toks): for _i, _tok in enumerate(_toks):
if _t == "--kv-disk-dir" and _i + 1 < len(_toks): if _tok == "--kv-disk-dir" and _i + 1 < len(_toks):
_kv_dir = _toks[_i + 1] _kv_dir = _toks[_i + 1]
break break
if not _kv_dir: if not _kv_dir:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment