summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/dump.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-30 23:24:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-30 23:25:10 +0100
commit8a5eb20a43d1465f401f7b739cc16c7b2e93a8af (patch)
treeec2693ea84fafb44c232e7e4eb821299e0d5a685 /meta/lib/oeqa/utils/dump.py
parent0f84702f0811cba4b6e6e890d478f6e98937b831 (diff)
downloadpoky-8a5eb20a43d1465f401f7b739cc16c7b2e93a8af.tar.gz
oeqa/utils/dump: Handle empty commandlist gracefully
If the commandlist isn't available, the code currently gives a backtrace. At least stop doing that and return more gracefully. (From OE-Core rev: e6903e9ef856d98258d81587bf85199cb7dbdca4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/dump.py')
-rw-r--r--meta/lib/oeqa/utils/dump.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/dump.py b/meta/lib/oeqa/utils/dump.py
index a76aede8c3..e71e1cd341 100644
--- a/meta/lib/oeqa/utils/dump.py
+++ b/meta/lib/oeqa/utils/dump.py
@@ -14,6 +14,8 @@ class BaseDumper(object):
14 def __init__(self, d, cmds): 14 def __init__(self, d, cmds):
15 self.cmds = [] 15 self.cmds = []
16 self.parent_dir = d.getVar("TESTIMAGE_DUMP_DIR", True) 16 self.parent_dir = d.getVar("TESTIMAGE_DUMP_DIR", True)
17 if not cmds:
18 return
17 for cmd in cmds.split('\n'): 19 for cmd in cmds.split('\n'):
18 cmd = cmd.lstrip() 20 cmd = cmd.lstrip()
19 if not cmd or cmd[0] == '#': 21 if not cmd or cmd[0] == '#':