diff options
author | Matthew Thode <mthode@mthode.org> | 2014-01-20 11:01:27 -0600 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-01-23 11:22:45 -0500 |
commit | e68a8d9fe0ac6788695bf779180db1ed790f6cb7 (patch) | |
tree | 8e7a9b603e9aabdf06453c4993f42d599facb597 /scripts | |
parent | updating python apps for pep8 (diff) | |
download | elfix-e68a8d9fe0ac6788695bf779180db1ed790f6cb7.tar.gz elfix-e68a8d9fe0ac6788695bf779180db1ed790f6cb7.tar.bz2 elfix-e68a8d9fe0ac6788695bf779180db1ed790f6cb7.zip |
fix used before define on sv/s
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/revdep-pax | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/revdep-pax b/scripts/revdep-pax index ebdea9c..2d9de16 100755 --- a/scripts/revdep-pax +++ b/scripts/revdep-pax @@ -240,11 +240,13 @@ def run_forward(verbose): try: (elf_str_flags, elf_bin_flags) = pax.getflags(elf) sv = '%s :%s ( %s )' % (elf, abi, elf_str_flags) - s = sv - except pax.PaxError: - sv = '%s :%s ( %s )' % (elf, abi, '****') - s = sv + except (pax.PaxError, RuntimeError, TypeError, NameError): + #because this is a pax error (likely), we need to set elf_str_flags + #elf_str_flags and sv are used a few lines down + elf_str_flags = '****' + sv = '%s :%s ( %s )' % (elf, abi, elf_str_flags) continue + s = sv count = 0 for soname in object_linkings[abi][elf]: @@ -291,10 +293,14 @@ def run_reverse(verbose, executable_only): (library_str_flags, library_bin_flags) = pax.getflags(library) except pax.PaxError: library_str_flags = '****' - sv = '%s\t%s :%s ( %s )' % (soname, library, abi, library_str_flags) - s = sv except KeyError: sonames_missing_library.append(soname) + library = 'unknown_library' + library_str_flags = '****' + #always gets set, and dependant variables always get set, no need to + #be in a try statement + sv = '%s\t%s :%s ( %s )' % (soname, library, abi, library_str_flags) + s = sv count = 0 for elf in object_reverse_linkings[abi][soname]: |