Merge pull request #293 from JakobDev/osystemfix

Replace os.system with subprocess.call
This commit is contained in:
Anton Hvornum 2021-04-13 07:08:29 +00:00 committed by GitHub
commit c2958aba16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import subprocess
import os
from .exceptions import *
@ -26,4 +27,4 @@ def search_keyboard_layout(filter, layout='qwerty'):
yield language
def set_keyboard_language(locale):
return os.system(f'loadkeys {locale}') == 0
return subprocess.call(['loadkeys',locale]) == 0