Skip to content

Commit

Permalink
List only directories when listing installed themes
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Sep 25, 2016
1 parent 1389d15 commit b6d5e40
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nikola/plugins/command/theme.py
Expand Up @@ -283,8 +283,9 @@ def list_installed(self):
themes_dirs = self.site.themes_dirs + [resource_filename('nikola', os.path.join('data', 'themes'))]
for tdir in themes_dirs:
themes += [(i, os.path.join(tdir, i)) for i in os.listdir(tdir)]
for theme in sorted(set(themes)):
print("{0} at {1}".format(*theme))
for tname, tpath in sorted(set(themes)):
if os.path.isdir(tpath):
print("{0} at {1}".format(tname, tpath))

def copy_template(self, template):
"""Copy the named template file from the parent to a local theme or to templates/."""
Expand Down

0 comments on commit b6d5e40

Please sign in to comment.