diff options
author | Thomas Roos <throos@amazon.de> | 2023-04-14 16:34:17 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-05-10 10:53:11 -1000 |
commit | 01eb8d4ad71c587d56608d83ec4187375b2f4c44 (patch) | |
tree | 1ccd741eea00b575b93ff6291f866c64a49bec18 /meta | |
parent | 928b7e880e6a5d1b807cb7f605649233c7195578 (diff) | |
download | openembedded-core-contrib-01eb8d4ad71c587d56608d83ec4187375b2f4c44.tar.gz |
oeqa/utils/metadata.py: Fix running oe-selftest running with no distro set
This will use default values when no distribution is set.
[YOCTO #15086]
Signed-off-by: Thomas Roos <throos@amazon.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
(cherry picked from commit 888fe63b46efceeff08dbe8c4f66fec33d06cb7a)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/utils/metadata.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/utils/metadata.py b/meta/lib/oeqa/utils/metadata.py index 8013aa684d..15ec190c4a 100644 --- a/meta/lib/oeqa/utils/metadata.py +++ b/meta/lib/oeqa/utils/metadata.py @@ -27,9 +27,9 @@ def metadata_from_bb(): data_dict = get_bb_vars() # Distro information - info_dict['distro'] = {'id': data_dict['DISTRO'], - 'version_id': data_dict['DISTRO_VERSION'], - 'pretty_name': '%s %s' % (data_dict['DISTRO'], data_dict['DISTRO_VERSION'])} + info_dict['distro'] = {'id': data_dict.get('DISTRO', 'NODISTRO'), + 'version_id': data_dict.get('DISTRO_VERSION', 'NO_DISTRO_VERSION'), + 'pretty_name': '%s %s' % (data_dict.get('DISTRO', 'NODISTRO'), data_dict.get('DISTRO_VERSION', 'NO_DISTRO_VERSION'))} # Host distro information os_release = get_os_release() |