From: Lucian Musat Date: Wed, 7 Jan 2015 16:29:00 +0000 (+0200) Subject: oeqa/parselogs: Added a check in case the folder location does not contain any log... X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~31623 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=affa3a126ba214f4d9b9a770e51323a6a5863bf2;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/parselogs: Added a check in case the folder location does not contain any log files Signed-off-by: Lucian Musat Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/runtime/parselogs.py b/meta/lib/oeqa/runtime/parselogs.py index 7eb333ab700..2953742f231 100644 --- a/meta/lib/oeqa/runtime/parselogs.py +++ b/meta/lib/oeqa/runtime/parselogs.py @@ -123,9 +123,10 @@ class ParseLogsTest(oeRuntimeTest): (status, output) = self.target.run("test -d "+str(location)) if (status == 0): (status, output) = self.target.run("find "+str(location)+"/*.log -maxdepth 1 -type f") - output = output.splitlines() - for logfile in output: - logs.append(os.path.join(location,str(logfile))) + if (status == 0): + output = output.splitlines() + for logfile in output: + logs.append(os.path.join(location,str(logfile))) return logs #build the grep command to be used with filters and exclusions