-
Notifications
You must be signed in to change notification settings - Fork 101
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
Python 3 compatibility - bytes and strings #47
Comments
Please can we get this into pip ASAP as it is a blocker for us. Thanks. |
Fixed version forked here https://github.com/okazdal/RouterOS-api |
I mean I don't see why that was necessary given you've literally just applied my pull request to another branch, leaving your branch identical to the one I already sent a pull request from.... This needs merging into master and then into pip. |
@davidc Sorry that I can't help you get this merged - the wheels turn pretty slowly on this project! @jgoclawski, could you take a look at the fix PR #48 ? |
The fix proposed #46 does not fix this since sometimes the value is already bytes, so it causes another error this time in get_api():
It seems that sometimes the value is a string and sometimes it is already encoded into bytes.
Ideally we would store it only as one or the other, but it is necessary to allow bytes so that the hashed password in RouterOsApi.login() can still be transmitted (it starts with a null byte)
In the absence of a larger refactor, I have amended get_api_format, if the value is not already bytes, to first coerce it to string (allowing the user finally to set integer values), and then into bytes.
The text was updated successfully, but these errors were encountered: