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
Read only mac address rp2040 #7358
Conversation
Will revise to fix #7357. |
Python uses AttributeError for a non-settable property but it has a clearer error ("can't set" vs "has no attribute"). Maybe we should fix this by making the failure to set the attribute have a distinct message:
It'd be up to you whether to have the sites you changed here use this style of message or the style of message that you already used. |
(or save even more code space by making the property either a GET or a GETSET depending on #defines, which would let this site's error checking be reused) |
@dhalbert let me know when you update this PR |
@jepler on CYW43, is the fact you can't set the MAC address for station or AP mode inherent, or just not implemented yet? That affects my thinking about what error to raise. I am changing the the |
832879d
to
03b43b7
Compare
As far as I can tell the mac address is not settable in cyw43. |
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.
Thank you!
Tested on Pico W and Metro ESP32-S2. |
EDIT: Also fixes #7357.
https://forums.adafruit.com/viewtopic.php?p=952638: user found
AttributeError
message confusing when trying to set MAC address on Pico W. The attribute exists, despite the message, but is not settable (currently?) for CYW43.NotImplementedError
instead, with a clarifying message.