Check that a filename points to a normal file before attempting to open it, as if the file turns out to be something more exotic like a FIFO it could hang forever.
Signed-off-by: Ross Burton <ross.bur...@intel.com> --- meta/lib/oe/qa.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py index d5cdaa0..4cb5b98 100644 --- a/meta/lib/oe/qa.py +++ b/meta/lib/oe/qa.py @@ -31,6 +31,10 @@ class ELFFile: self.objdump_output = {} def open(self): + import os.path + if not os.path.isfile(self.name): + raise Exception("File is not a normal file") + self.file = file(self.name, "r") self.data = self.file.read(ELFFile.EI_NIDENT+4) -- 2.7.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core