fix list_keymaps for python 3.5
This commit is contained in:
parent
512261b343
commit
58101cbb73
1 changed files with 2 additions and 2 deletions
|
@ -121,7 +121,7 @@ def list_keymaps(keyboard_name):
|
||||||
while kb_path != keyboards_dir:
|
while kb_path != keyboards_dir:
|
||||||
keymaps_dir = kb_path / "keymaps"
|
keymaps_dir = kb_path / "keymaps"
|
||||||
if keymaps_dir.exists():
|
if keymaps_dir.exists():
|
||||||
names = names.union([keymap for keymap in os.listdir(keymaps_dir) if (keymaps_dir / keymap / "keymap.c").is_file()])
|
names = names.union([keymap for keymap in os.listdir(str(keymaps_dir)) if (keymaps_dir / keymap / "keymap.c").is_file()])
|
||||||
kb_path = kb_path.parent
|
kb_path = kb_path.parent
|
||||||
|
|
||||||
# if community layouts are supported, get them
|
# if community layouts are supported, get them
|
||||||
|
@ -129,6 +129,6 @@ def list_keymaps(keyboard_name):
|
||||||
for layout in rules_mk["LAYOUTS"].split():
|
for layout in rules_mk["LAYOUTS"].split():
|
||||||
cl_path = Path.cwd() / "layouts" / "community" / layout
|
cl_path = Path.cwd() / "layouts" / "community" / layout
|
||||||
if cl_path.exists():
|
if cl_path.exists():
|
||||||
names = names.union([keymap for keymap in os.listdir(cl_path) if (cl_path / keymap / "keymap.c").is_file()])
|
names = names.union([keymap for keymap in os.listdir(str(cl_path)) if (cl_path / keymap / "keymap.c").is_file()])
|
||||||
|
|
||||||
return sorted(names)
|
return sorted(names)
|
||||||
|
|
Loading…
Reference in a new issue