]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/utils/dump: Handle empty commandlist gracefully
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 30 Aug 2015 22:24:07 +0000 (23:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 30 Aug 2015 22:24:10 +0000 (23:24 +0100)
If the commandlist isn't available, the code currently gives a backtrace.
At least stop doing that and return more gracefully.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/dump.py

index a76aede8c38accb2aa90f3b55cabceef18127f36..e71e1cd341a6524dd99af87934cfa0564c9b7e5b 100644 (file)
@@ -14,6 +14,8 @@ class BaseDumper(object):
     def __init__(self, d, cmds):
         self.cmds = []
         self.parent_dir = d.getVar("TESTIMAGE_DUMP_DIR", True)
+        if not cmds:
+            return
         for cmd in cmds.split('\n'):
             cmd = cmd.lstrip()
             if not cmd or cmd[0] == '#':