move python2 code (str.decode) to the python2 block in install_prompt
(LP: #1073919)