Fix a crash when localizing an authentication error for GitLab.

Review Request #12678 — Created Oct. 10, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

When attempting to provide an error message for failed authentication for
HTTP HEAD requests, ugettext() was used to localize the string. The
module had been updated to import gettext instead of ugettext, causing
this to crash.

This change updates the call to use gettext() instead.

Added a unit test, which I verified failed before this fix and passed
after.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Fix a crash when localizing an authentication error for GitLab.
When attempting to provide an error message for failed authentication, `ugettext()` was used to localize the string. The module had been updated to import `gettext` instead of `ugettext`, causing this to crash. This change updates the call to use `gettext()` instead.
ca0ffaacbbe30393a6b33a86abc8fa71837d379d Christian Hammond
reviewboard/hostingsvcs/gitlab.py
reviewboard/hostingsvcs/tests/test_gitlab.py
Loading...