Skip to content

fix: Handle import error in RFIDReader - #341

Open
sevjor wants to merge 1 commit into
DouglasHalse:mainfrom
sevjor:fix_import_error
Open

fix: Handle import error in RFIDReader#341
sevjor wants to merge 1 commit into
DouglasHalse:mainfrom
sevjor:fix_import_error

Conversation

@sevjor

@sevjor sevjor commented Jun 14, 2026

Copy link
Copy Markdown

The RFICReader only mocks gpio for windows. Since mfrc522 is not available for non-raspberry systems, other linux distros can get import error.

Added support to check what distro a linux system is running, and mock if not raspbian.

Also handle import error as a last guard.

@DouglasHalse
DouglasHalse self-requested a review June 14, 2026 14:44
@DouglasHalse DouglasHalse linked an issue Jun 14, 2026 that may be closed by this pull request
@DouglasHalse

Copy link
Copy Markdown
Owner

Installing the pre-commit hooks locally is probably the easiest way to replicate the pre-commit nags locally

Comment thread requirements-dev.txt
pytest-cov
pytest-asyncio No newline at end of file
pytest-asyncio
distro

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distro will be needed on target as well. Should work on target if you put "distro" in requirements.txt rather than requirements-dev.txt

@DouglasHalse

Copy link
Copy Markdown
Owner

#342 should fix the failing tests

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.

Cannot run snack attack on non-raspberry pi Linux distros

2 participants