-
Notifications
You must be signed in to change notification settings - Fork 605
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
seeed interface: fix fileno issue with windows #902
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #902 +/- ##
==========================================
Coverage ? 68.37%
==========================================
Files ? 71
Lines ? 6992
Branches ? 0
==========================================
Hits ? 4781
Misses ? 2211
Partials ? 0 |
This has come up also with with slcan (#760). |
0285c31
to
83dea3f
Compare
Thanks for the feedback @bmeisels. I think that I understood what you're asking for based on those two PRs you linked to, so I went ahead and amended the commit. |
83dea3f
to
16a3a10
Compare
# Return an invalid file descriptor on Windows | ||
except io.UnsupportedOperation: | ||
raise NotImplementedError("fileno is not implemented using current CAN bus") | ||
|
||
return -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line now looks unreachable, and should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hardbyte I've amended the commit to remote that line 👍
816bdd9
to
f1f7fe3
Compare
f1f7fe3
to
77c1737
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sorry it took me a long time to get back to this
Is there anything I can do to help get this merged into develop? |
Environment:
Issue
When using the seeedstudio interface on Linux or MacOS, I'm able to connect to the interface and send/receive messages.
When running the same script on Windows 10 the following error is thrown:
From the python-serial docs,
fileno()
is only supported on Posix platforms.The commit below fixes the issue for me, without breaking functionality on Linux, although I'm not sure if this is correct solution.