[elbe-devel] [PATCH] elbeproject: raise UnsupportedSDKException

Olivier Dion dion at linutronix.de
Wed Jul 15 17:56:09 CEST 2020


On Wed, 15 Jul 2020, Olivier Dion <dion at linutronix.de> wrote:
> On Wed, 15 Jul 2020, John Ogness <john.ogness at linutronix.de> wrote:
>> 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:
>
> This has already been fixed on master.

Never mind.  You're concerned with the exception handling.

-- 
Olivier Dion
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen


More information about the elbe-devel mailing list