From 734311e012c2708f759766d69697c8a1614df559 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Fri, 7 Aug 2020 01:05:29 +0500 Subject: [PATCH] tcmode-external-oe-sdk: handle non-exported vars when parsing setup scripts JIRA: SB-15362 Signed-off-by: Christopher Larson --- conf/distro/include/tcmode-external-oe-sdk.inc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/conf/distro/include/tcmode-external-oe-sdk.inc b/conf/distro/include/tcmode-external-oe-sdk.inc index 55518dc..0d80696 100644 --- a/conf/distro/include/tcmode-external-oe-sdk.inc +++ b/conf/distro/include/tcmode-external-oe-sdk.inc @@ -157,7 +157,13 @@ def parse_setup_script(setup): for line in value.splitlines(): if line.split(): split = shlex.split(line) - if split and split[0] == 'export': - k, v = split[1].split('=', 1) - values[k] = v + if len(split) == 2 and split[0] == 'export': + split = split[1:] + if len(split) == 1: + try: + k, v = split[0].split('=', 1) + except ValueError: + continue + else: + values[k] = v return values