From: Richard Purdie Date: Sun, 30 Aug 2015 22:24:07 +0000 (+0100) Subject: oeqa/utils/dump: Handle empty commandlist gracefully X-Git-Tag: 2015-10~675 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=e6903e9ef856d98258d81587bf85199cb7dbdca4;p=openembedded-core.git 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 --- 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] == '#':