[oe-commits] Lucian Musat : oeqa/parselogs: Added a check in case the folder location does not contain any log files

git at git.openembedded.org git at git.openembedded.org
Wed Jan 7 23:56:29 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: affa3a126ba214f4d9b9a770e51323a6a5863bf2
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=affa3a126ba214f4d9b9a770e51323a6a5863bf2

Author: Lucian Musat <george.l.musat at intel.com>
Date:   Wed Jan  7 18:29:00 2015 +0200

oeqa/parselogs: Added a check in case the folder location does not contain any log files

Signed-off-by: Lucian Musat <george.l.musat at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oeqa/runtime/parselogs.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/runtime/parselogs.py b/meta/lib/oeqa/runtime/parselogs.py
index 7eb333a..2953742 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



More information about the Openembedded-commits mailing list