( )⚙ D1478 py3: cast error message to localstr in blackbox.py

This is an archive of the discontinued Mercurial Phabricator instance.

py3: cast error message to localstr in blackbox.py
ClosedPublic

Authored by indygreg on Nov 21 2017, 2:53 AM.

Details

Summary

According to the exceptions reporting mechanism, this is the #1 crasher
in the test harness for Python 3.

Since this exception is in an except block, we'll likely get a
new #1 crasher after this change. But at least we won't die
during error handling!

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Nov 21 2017, 2:53 AM
yuja requested changes to this revision.Nov 21 2017, 7:30 AM
yuja added a subscriber: yuja.

encoding.strtolocal() should be used here.
IOError may contain non-ascii character on Windows.

This revision now requires changes to proceed.Nov 21 2017, 7:30 AM
indygreg edited the summary of this revision. (Show Details)Jan 14 2018, 3:13 PM
indygreg retitled this revision from py3: cast error message to bytes in blackbox.py to py3: cast error message to localstr in blackbox.py.
indygreg updated this revision to Diff 4823.
yuja accepted this revision.Jan 17 2018, 9:31 AM
This revision is now accepted and ready to land.Jan 17 2018, 9:31 AM
This revision was automatically updated to reflect the committed changes.