Skip to content

Commit

Permalink
fix list_keymaps for python 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
skullydazed committed Feb 15, 2020
1 parent 512261b commit 58101cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/python/qmk/keymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ def list_keymaps(keyboard_name):
while kb_path != keyboards_dir:
keymaps_dir = kb_path / "keymaps"
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

# if community layouts are supported, get them
if "LAYOUTS" in rules_mk:
for layout in rules_mk["LAYOUTS"].split():
cl_path = Path.cwd() / "layouts" / "community" / layout
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)

0 comments on commit 58101cb

Please sign in to comment.