freeipa / ansible-freeipa

Ansible roles and modules for FreeIPA
GNU General Public License v3.0
489 stars 232 forks source link

Do not use "del os.environ" as the variable might not exist #1142

Closed t-woerner closed 12 months ago

t-woerner commented 12 months ago

The use of del os.environ assumes that the environment variable exists. If the variable does not exist, this call will result in a traceback. The solution is to use os.environ.pop(VARIABLE, None) instead.

This is the ansible-freeipa fix for https://pagure.io/freeipa/issue/9446 (Nightly test failure for replica installation with --setup-ca)