Skip to content

Fix for Empty except#822

Closed
Andrey1994 wants to merge 1 commit intomasterfrom
finding-autofix-eff6da51
Closed

Fix for Empty except#822
Andrey1994 wants to merge 1 commit intomasterfrom
finding-autofix-eff6da51

Conversation

@Andrey1994
Copy link
Copy Markdown
Member

To fix this without changing functionality, keep ignoring socket.timeout but add an explanatory comment in that except block clarifying that timeout is expected in the receive loop and should not interrupt streaming/sending logic.

Best single change:

  • File: emulator/brainflow_emulator/biolistener_emulator.py
  • Region: run() method, try/except around recv, specifically the except socket.timeout: block (around lines 168–169).
  • Replace the empty pass with a commented no-op:
    • Add a short comment (e.g., “Expected when no command arrives within socket timeout; continue loop.”)
    • Keep pass to preserve behavior.

No imports, new methods, or dependency changes are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Andrey1994 Andrey1994 closed this Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant