From b00f307a287ef7ef32d5c9988d79cf60d09c26ae Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 11 Nov 2020 22:18:22 +0000 Subject: Added minor error handling in installer.set_keyboard_language() --- archinstall/lib/installer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index c233a876..543f2ca3 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -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 \ No newline at end of file -- cgit v1.2.3-70-g09d2