symbolextractor: use try/finally in solaris_syms when wrapping gnu_syms
As suggested by dcbaker in
@@ -124,8 +124,10 @@ def gnu_syms(libfilename: str, outfilename: str):
def solaris_syms(libfilename: str, outfilename: str):
# gnu_syms() works with GNU nm & readelf, not Solaris nm & elfdump
origpath = os.environ['PATH']
+ try:
os.environ['PATH'] = '/usr/gnu/bin:' + origpath
gnu_syms(libfilename, outfilename)
+ finally:
os.environ['PATH'] = origpath
def osx_syms(libfilename: str, outfilename: str):
