Skip to content

fix: correct Queue truthiness check in TwitterInput plugin#2430

Open
dolepee wants to merge 1 commit intoOpenMind:mainfrom
dolepee:fix/twitter-queue-truthiness
Open

fix: correct Queue truthiness check in TwitterInput plugin#2430
dolepee wants to merge 1 commit intoOpenMind:mainfrom
dolepee:fix/twitter-queue-truthiness

Conversation

@dolepee
Copy link
Contributor

@dolepee dolepee commented Feb 28, 2026

Fixes #2411. The TwitterInput plugin used which always evaluates True for a Queue object, causing get_nowait() to be called even when the queue is empty. This relied on catching Empty exceptions rather than proper flow control.\n\nChanged to to correctly check for messages before attempting to retrieve them.\n\nThis is a tiny but important bug fix that eliminates unnecessary exception handling and improves efficiency.

Changed  to  in src/inputs/plugins/twitter.py (line 121). Queue objects are always truthy, leading to get_nowait() calls on empty queue. Fixes issue OpenMind#2411.
@dolepee dolepee requested review from a team as code owners February 28, 2026 10:54
@github-actions github-actions bot added robotics Robotics code changes python Python code labels Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code robotics Robotics code changes

Projects

None yet

1 participant