tools: only display "trouble reading […]" message when the script fails.

Displaying it all the time when we fail the first attempt is confusing
as it is expected to fail in the meson build (since build libraries are
in different folders). Instead only output the error message when both
known paths failed, i.e. when we fail the script (and write down both
attempted path in the error message).
This commit is contained in:
Jehan 2022-08-01 17:07:30 +02:00
parent e4cd2405a9
commit f22b82f22f
1 changed files with 1 additions and 2 deletions

View File

@ -85,11 +85,10 @@ for df in def_files:
libname)
if status != 0:
libname_meson = path.join(directory, "lib" + basename + "-*.so")
print("trouble reading {} - trying {}".format(libname, libname_meson))
status, nm = subprocess.getstatusoutput ("nm --defined-only --extern-only " +
libname_meson)
if status != 0:
print("trouble reading {} - has it been compiled?".format(libname_meson))
print("trouble reading {} or {} - has it been compiled?".format(libname, libname_meson))
have_errors = -1
continue