Replace os.system with subprocess.call

This commit is contained in:
JakobDev 2021-04-12 15:13:49 +02:00 committed by GitHub
parent 27e7c01e55
commit fe2c3cc14d
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