From e6903e9ef856d98258d81587bf85199cb7dbdca4 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 30 Aug 2015 23:24:07 +0100 Subject: 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. Signed-off-by: Richard Purdie --- meta/lib/oeqa/utils/dump.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta/lib') 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): 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] == '#': -- cgit 1.2.3-korg