Skip to content

Commit 2d198ed

Browse files
committed
minor code cleanup in sanity_check_rpath
1 parent ed67caa commit 2d198ed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

easybuild/framework/easyblock.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3132,13 +3132,14 @@ def sanity_check_rpath(self, rpath_dirs=None, check_readelf_rpath=True):
31323132

31333133
# check whether RPATH section in 'readelf -d' output is there
31343134
if check_readelf_rpath:
3135+
fail_msg = None
31353136
out, ec = run_cmd("readelf -d %s" % path, simple=False, trace=False)
31363137
if ec:
31373138
fail_msg = "Failed to run 'readelf %s': %s" % (path, out)
3138-
self.log.warning(fail_msg)
3139-
fails.append(fail_msg)
31403139
elif not readelf_rpath_regex.search(out):
31413140
fail_msg = "No '(RPATH)' found in 'readelf -d' output for %s: %s" % (path, out)
3141+
3142+
if fail_msg:
31423143
self.log.warning(fail_msg)
31433144
fails.append(fail_msg)
31443145
else:

0 commit comments

Comments
 (0)