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>
(cherry picked from commit 7dde8ae61ee58ef8457f9c9ab6d908fa8c01ea2b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f090f0e357fd97fabd99465d2084a5d1e77e77f5)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f3c1e799a62126a0d4fd2a26c75bf3df545cf13b)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed