Added minor error handling in installer.set_keyboard_language()

This commit is contained in:
Anton Hvornum 2020-11-11 22:18:22 +00:00
parent f6460b8634
commit b00f307a28
1 changed files with 4 additions and 3 deletions

View File

@ -292,7 +292,8 @@ class Installer():
pass
def set_keyboard_language(self, language):
with open(f'{self.mountpoint}/etc/vconsole.conf', 'w') as vconsole:
vconsole.write(f'KEYMAP={language}\n')
vconsole.write(f'FONT=lat9w-16\n')
if len(language.strip()):
with open(f'{self.mountpoint}/etc/vconsole.conf', 'w') as vconsole:
vconsole.write(f'KEYMAP={language}\n')
vconsole.write(f'FONT=lat9w-16\n')
return True