This is an archive of the discontinued Mercurial Phabricator instance.

statichttprepo: use URLError.reason directly
ClosedPublic

Authored by indygreg on Jan 26 2019, 2:43 PM.

Details

Summary

0b3f4be5c5bf changed str(inst) to inst.reason[0] all the way back
in 2006. URLError.reason is a str and we should have taken that
attribute in its entirety. I think the code was supposed to be
inst.args[1] for compatibility with ancient Python versions.
Python 2.7 always sets .reason, so it should be safe to use
directly.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Jan 26 2019, 2:43 PM
pulkit accepted this revision.Jan 26 2019, 4:33 PM
This revision was automatically updated to reflect the committed changes.