UnboundLocalError when _ser is None — lines was only assigned inside the else branch. Move initialisation to function scope so the for-loop outside the lock always has a valid list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
UnboundLocalError when _ser is None — lines was only assigned inside the else branch. Move initialisation to function scope so the for-loop outside the lock always has a valid list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>