BUG/MINOR: spoa/python: Cleanup ipaddress objects if initialization fails
authorGilchrist Dadaglo <dadaglo@amazon.com>
Tue, 8 Dec 2020 14:37:12 +0000 (14:37 +0000)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Dec 2020 08:31:05 +0000 (09:31 +0100)
commit7dde8ae61ee58ef8457f9c9ab6d908fa8c01ea2b
treefee65eaeca5b047ce35e3d129dc582ba7b61ac4b
parent2efe413b82d4fd35178ecb96e7b5f4336deb4cc5
BUG/MINOR: spoa/python: Cleanup ipaddress objects if initialization fails

This change is to ensure objects from the ipaddress module are cleaned
up when spoa module initialization fails.
In general the interpreter would just crash, but in a code where import
is conditional (try/except), then we would keep those objects around

This patch must be backported as far as 2.0.

(cherry picked from commit d1c0cf80bceb352b6bf33064b352f6dbe2b0b39c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
contrib/spoa_server/ps_python.c