You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 11, 2020. It is now read-only.
An uncaught TypeError is raised when Scheme.for_cell is called for an encrypted cell, without the optional passkey argument.
When no passkey is supplied, for_cell calls configuration with passkey=None , which, if the encryption happens to be 'wpa', fails on len(passkey) in scheme.py:23:
TypeError: objectof type 'NoneType'hasnolen()
The text was updated successfully, but these errors were encountered:
This is not a very friendly error message now is it.
I think that Scheme.for_cell could check if the cell is encrypted and then throw a TypeError about the missing passkey. Do you think that is appropriate? It would still result in an error, but at least we could control the error message.
Not sure about TypeError as the arguments given do match the function definition; they only go awry of the business logic. A custom exception like InterfaceError seems more appropriate.
I would have submitted a pull request to do this but the intended behaviour was not clear. For example, if the encryption type is 'wep', it would just return with 'wireless-key' : None and presumably fail upon trying to connect, but not before. So it's a design decision, up to you.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
(This was reported on StackOverflow here).
An uncaught
TypeError
is raised whenScheme.for_cell
is called for an encrypted cell, without the optionalpasskey
argument.When no passkey is supplied,
for_cell
callsconfiguration
withpasskey=None
, which, if the encryption happens to be 'wpa', fails onlen(passkey)
in scheme.py:23:The text was updated successfully, but these errors were encountered: