[elbe-devel] [PATCH] elbeproject: raise UnsupportedSDKException
John Ogness
john.ogness at linutronix.de
Wed Jul 15 17:34:45 CEST 2020
If host_pkglist.append() fails, a KeyError exception is raised
that the package "g++-None" is not found. The
UnsupportedSDKException is never raised.
Explicitly raise UnsupportedSDKException if sdkarch is not
defined for the architecture.
Note that if sdkarch is defined and the g++-sdkarch package
does not exist, the KeyError exception will still be raised. This
is correct since it would be a bug in ELBE that specifies the
wrong sdkarch value.
Signed-off-by: John Ogness <john.ogness at linutronix.de>
---
elbepack/elbeproject.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 3bf0f1789..1c72327ac 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -377,9 +377,9 @@ class ElbeProject (object):
if p.tag == 'pkg':
host_pkglist.append(p.et.text.strip())
else:
- try:
+ if self.xml.defs["sdkarch"]:
host_pkglist.append("g++-%s" % self.xml.defs["sdkarch"])
- except KeyError:
+ else:
raise UnsupportedSDKException(triplet)
host_pkglist.append('gdb-multiarch')
--
2.20.1
More information about the elbe-devel
mailing list