Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfidiot should not exit at module import time #35

Open
rhertzog opened this issue Jan 15, 2019 · 1 comment
Open

rfidiot should not exit at module import time #35

rhertzog opened this issue Jan 15, 2019 · 1 comment

Comments

@rhertzog
Copy link

There are many tools which expect that all Python modules can be imported without any side-effect. Unfortunately rfidiot is not in that category, when you import the module it will exit with an error messages like this one:

There is no such reader #0, PCSC sees only 0 reader(s)

In Kali Linux, we got this bug report showing an application feature that is broken by rfidiot:
https://bugs.kali.org/view.php?id=4056

Please refactor the code to avoid such side effects at import time.

@rhertzog
Copy link
Author

FWIW, this is caused by

card= RFIDIOt.rfidiot(readernum,readertype,line,speed,timeout,rfidiotglobals.Debug,noinit,nfcreader)
and
os._exit(True)

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

No branches or pull requests

1 participant