This is an archive of the discontinued Mercurial Phabricator instance.

fsmonitor: normalize exception types to bytes
ClosedPublic

Authored by indygreg on Nov 2 2019, 6:03 PM.

Details

Summary

Unavailable.msg should now always be bytes.

We also rename Unavailable.str to bytes as it always
returns bytes. We make str a simple wrapper that decodes that
result to str.

There's probably some excessive strutil.forcebytestr() in
fsmonitor/__init__.py now. But at least the exceptions around
type coercion should now be gone.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Nov 2 2019, 6:03 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.