Avoid problems when nis is not available on a system.

Review Request #12865 — Created March 3, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

The NIS backend assumes that it can safely import the nis module.
However, this isn't always present on Python, and will be removed in
Python 3.13.

This change checks for this, attempting an import and logging if it
fails. The rest of the code will avoid trying to use the module if it's
not available, avoiding a crash.

This was hit in CI, where our Python 3.11 does not appear to ship with
NIS support.

Unit tests pass, with and without nis.

Commits

Files

    Loading...