mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-23 00:37:41 +00:00
fix(linux): Fix crash if query doesn't contain bcp47 tag (#4800)
(cherry picked from commit c9de93d478)
This commit is contained in:
parent
a07d58eaaf
commit
5c1c114e5d
1 changed files with 4 additions and 3 deletions
|
|
@ -47,9 +47,10 @@ def download_and_install_package(url):
|
|||
def _extract_bcp47(query):
|
||||
if query:
|
||||
queryStrings = parse_qs(query)
|
||||
values = queryStrings['bcp47']
|
||||
if len(values) > 0:
|
||||
return values[0]
|
||||
if 'bcp47' in queryStrings:
|
||||
values = queryStrings['bcp47']
|
||||
if len(values) > 0:
|
||||
return values[0]
|
||||
return ''
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue