device: check for existences of keys file before opening
This commit is contained in:
parent
4225fce8d7
commit
932bc5cb0e
|
@ -1525,6 +1525,7 @@ KEYCODES = _NamedInts(
|
||||||
|
|
||||||
# load in override dictionary for KEYCODES
|
# load in override dictionary for KEYCODES
|
||||||
try:
|
try:
|
||||||
|
if _os.path.isfile(_keys_file_path):
|
||||||
with open(_keys_file_path) as keys_file:
|
with open(_keys_file_path) as keys_file:
|
||||||
keys = _yaml.safe_load(keys_file)
|
keys = _yaml.safe_load(keys_file)
|
||||||
if isinstance(keys, dict):
|
if isinstance(keys, dict):
|
||||||
|
|
Loading…
Reference in New Issue