buildtools: Always reset the build environment
commit2bf1443bd0f1cb95d11f42db5ef4a7637981ee6b
authorPetr Viktorin <pviktori@redhat.com>
Fri, 22 May 2015 11:06:48 +0000 (22 13:06 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 10 Jun 2015 04:06:18 +0000 (10 06:06 +0200)
tree25c059a854fe03713c0af658e2dd90598c6ae22d
parent728cfa5d3983c545f2a09947c8aabc90da3b5bc5
buildtools: Always reset the build environment

In install_library, the Build object's environment was not reset
after an early return, so the extrapython env would be used in
subsequent build steps.
Wrap everything in a try-finally block to make sure the env is reset.

(Almost all of the change is indentation, `git show -w` recommended.)

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
buildtools/wafsamba/samba_install.py