-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix crash caused by mixup of bytes and str #23
Conversation
Popen.communicate() return a tuple of bytes, but the rest of the code expects str. Decoding the bytes object fixes this. Some (very weird) outputs may now fail with UnicodeDecodeError, but that'd probably be indicative of a bug elsewhere.
Ah, did Python 3 change the return value? Does your patch still work on Python 2? |
Yes. This should still work on Python 2, as (at least in my version) it has a method "decode" on both "normal" and Unicode strings. However, the rest of the code might not work anymore, as it uses print as a function without importing the necessary compatibility modules (that's only a problem with verbose mode, though). |
Great, thanks. Yeah I noticed the print thing got introduced in 1492c85, looks like we need a IIRC, I would be able to merge this pull request here on github but can't publish any updates on pip. So I'll let @j0hnsmith hopefully take care of this when he gets a chance. |
@natevw Cool, just give me a nudge when it's ready to go to pypi. |
Done. |
Thanks, I've merged this. @j0hnsmith can you publish on pypi? |
The version must be updated and the package is not on pypi. |
Updated the version in |
|
This fixes dependency-based checking for "outdatedness".
Popen.communicate() return a tuple of bytes, but the rest of the code
expects str. Decoding the bytes object fixes this. Some (very weird)
outputs may now fail with UnicodeDecodeError, but that'd probably be
indicative of a bug elsewhere.