Check whether the elf is not None first, before doing os.stat() calls
on disk. Also don't check anything that isn't a file, not just FIFOs.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
QAPATHTEST[shebang-size] = "package_qa_check_shebang_size"
def package_qa_check_shebang_size(path, name, d, elf):
- import stat
- if os.path.islink(path) or stat.S_ISFIFO(os.stat(path).st_mode) or elf:
+ if elf or os.path.islink(path) or not os.path.isfile(path):
return
try: