Fix critical crash when running on non utf-8 environment.
Review Request #7395 — Created June 8, 2015 and submitted
Information | |
---|---|
bgolek | |
RBTools | |
Reviewers | |
rbtools | |
When running on non UTF-8 environment with mercurial as repository RBTools crashes for every command with message:
'CRITICAL: 'utf8' codec can't decode byte 0xb3 in position 22: invalid start byte.'. This is caused by assumption in process.py execute method.Now we are using sys.getfilesystemencoding() instead of assumpted 'utf-8'.
Running on non UTF-8 environment (Win7, x64 PL) does not cause error anymore.
-
Mind reworking the description into more of the format described here? https://www.reviewboard.org/docs/codebase/dev/writing-good-descriptions/
That will help with getting a thorough understanding of the problem, its cause, its fix, and why the fix works. It will also help when bisecting commits later, and with preparation of release notes. -
Summary: |
|
||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||||||||
Testing Done: |
|

-
Tool: Pyflakes Processed Files: rbtools/utils/process.py Tool: PEP8 Style Checker Processed Files: rbtools/utils/process.py
-
r2 of your diff doesn't seem like it is correct (it seems to only be the top commit instead of the full diff from origin/master)
-
rbtools/utils/process.py (Diff revision 2) The filesystem encoding doesn't seem like the "correct" thing here, since this is the output of the program. Does
sys.getdefaultencoding()
return the right thing?