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
This commit is contained in:
parent
176c7c547e
commit
431afc847e
@ -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]
|
||||
)
|
||||
|
||||
@ -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]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user