From bf0e47cef88ee9a582bf57cbf96ea783a13ddc6a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 12 Apr 2015 01:04:38 +0900 Subject: [PATCH] fix listprojects Signed-off-by: Nico Schottelius --- lib/ctt/listprojects.py | 6 +++++- scripts/ctt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ctt/listprojects.py b/lib/ctt/listprojects.py index 06043e6..c4d0d87 100755 --- a/lib/ctt/listprojects.py +++ b/lib/ctt/listprojects.py @@ -22,6 +22,7 @@ import ctt import logging +import os log = logging.getLogger(__name__) @@ -40,5 +41,8 @@ class ListProjects(object): @staticmethod def list_projects(): - for project in ctt.list_projects(ctt.ctt_dir()): + for project in sorted(os.listdir(ctt.ctt_dir())): + if project[0] == ".": + continue + yield project diff --git a/scripts/ctt b/scripts/ctt index 612dd4d..b23dcc1 100755 --- a/scripts/ctt +++ b/scripts/ctt @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -# 2012-2013 Nico Schottelius (nico-ctt at schottelius.org) +# 2012-2015 Nico Schottelius (nico-ctt at schottelius.org) # # This file is part of ctt. #