Merge pull request #320 from SecondThundeR/language-select-fix

Fix selecting language layout by name
This commit is contained in:
Anton Hvornum 2021-04-17 08:03:45 +00:00 committed by GitHub
commit 7be93adb99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -358,8 +358,7 @@ def select_language(options, show_only_country_codes=True):
# all possible language layouts, and we might want to write
# for instance sv-latin1 (if we know that exists) without having to
# go through the search step.
elif selected_language in options:
selected_language = options[options.index(selected_language)]
elif selected_language in languages:
return selected_language
else:
raise RequirementError("Selected language does not exist.")