input needs byte string as input to avoid UnicodeDecodeError.

Review Request #6975 — Created Feb. 24, 2015 and submitted

Information

RBTools
master
da24725...

Reviewers

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.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/utils/console.py
        rbtools/api/request.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/utils/console.py
        rbtools/api/request.py
    
    
  2. 
      
HA
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/utils/console.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/utils/console.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
HA
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.7.x (2f5bc36)