]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/parselogs: Added a check in case the folder location does not contain any log...
authorLucian Musat <george.l.musat@intel.com>
Wed, 7 Jan 2015 16:29:00 +0000 (18:29 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Jan 2015 23:48:55 +0000 (23:48 +0000)
Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/parselogs.py

index 7eb333ab700898837287605644da465f443ee27d..2953742f23153a10e9a26b06d07326681181be94 100644 (file)
@@ -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