( )⚙ D7855 fsmonitor: properly handle str ex.msg

This is an archive of the discontinued Mercurial Phabricator instance.

fsmonitor: properly handle str ex.msg
ClosedPublic

Authored by indygreg on Jan 13 2020, 11:13 PM.

Details

Summary

ex.msg is always a str, since pywatchman uses str for exception messages.

This commit removes a b'' from a string compare to avoid types
mismatch and adds a coercion to bytes before stuffing the exception
message on our local exception type, which uses bytes for the message
elsewhere in this file.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

indygreg created this revision.Jan 13 2020, 11:13 PM
pulkit accepted this revision.Jan 14 2020, 10:03 AM
This revision is now accepted and ready to land.Jan 14 2020, 10:03 AM
This revision was automatically updated to reflect the committed changes.