input needs byte string as input to avoid UnicodeDecodeError.
Review Request #6975 — Created Feb. 24, 2015 and submitted
input apparently needs byte string as input.
Unexpected errors occured if rbt post was to update a review request with unicode characters in the summary. This seems to be due to the fact that input() cannot take unicode strings as an argument.
The behavior can be tested by setting up a ReviewBoard server with a testrepo (path /home/user/repo) and running the following bash script:
Tested with the following bash script:SERVER=http://localhost:8090/ hg clone testrepo clientrepo cd clientrepo echo "test" > tmp.txt hg commit -m "ÆØÅæøå" -u "User æøå" rbt post --server $SERVER --repository testrepo --username testuser --password password --debug echo "bla3" > tmp.txt hg commit -m "æææ" -u "øøø" rbt post --server $SERVER --repository testrepo --username testuser --password password --debug -u
The second call to rbt post lead to a UnicodeDecodeError.
HA
- Change Summary:
-
The previous diff was wrong.
- Summary:
-
Make sure request.method is encoded to bytestring to avoid error in httplibinput needs byte string as input to avoid UnicodeDecodeError.
- Commit:
-
691064725b812650a442c335a2cd1797bbb0b6e1da24725b673edec6705f5dd1fa2fcb17613070c8
- Diff:
-
Revision 2 (+2 -1)