From 431afc847e0082f5c8a5927e2b581cdcd5fc6a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Tue, 20 Jun 2017 18:31:07 +0200 Subject: [PATCH] Fixed setup_plymouth_splash The schema generated get_bootsplash_theme() method returns a list because it's section content. The return value of the method was used as a string which caused a runtime error --- kiwi/system/setup.py | 5 +++-- test/unit/system_setup_test.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kiwi/system/setup.py b/kiwi/system/setup.py index c0ad62ac..dd7b4cfd 100644 --- a/kiwi/system/setup.py +++ b/kiwi/system/setup.py @@ -368,8 +368,9 @@ class SystemSetup(object): theme_setup = 'plymouth-set-default-theme' if Path.which(filename=theme_setup, custom_env=chroot_env): for preferences in self.xml_state.get_preferences_sections(): - splash_theme = preferences.get_bootsplash_theme() - if splash_theme: + splash_section_content = preferences.get_bootsplash_theme() + if splash_section_content: + splash_theme = splash_section_content[0] Command.run( ['chroot', self.root_dir, theme_setup, splash_theme] ) diff --git a/test/unit/system_setup_test.py b/test/unit/system_setup_test.py index af77754f..a7e265fc 100644 --- a/test/unit/system_setup_test.py +++ b/test/unit/system_setup_test.py @@ -411,7 +411,7 @@ class TestSystemSetup(object): mock_which.return_value = 'plymouth-set-default-theme' preferences = mock.Mock() preferences.get_bootsplash_theme = mock.Mock( - return_value='some-theme' + return_value=['some-theme'] ) self.xml_state.get_preferences_sections = mock.Mock( return_value=[preferences]