Permalink
Browse files

Use iterable from pygit2

  • Loading branch information...
richo committed Jan 5, 2013
1 parent 8d9586a commit 0a2ed3ca2bd2933e5d1d38f86aed5b6acf9ea742
Showing with 1 addition and 11 deletions.
  1. +1 −11 groundstation/station.py
View
@@ -25,14 +25,6 @@ def __init__(self, path, identity):
self.identity_cache = {}
self.registry = RequestRegistry()
- def _build_objects(self, db, dirname, files):
- cur = os.path.basename(dirname)
- if len(cur) == 2:
- for file in files:
- objname = u"".join((cur, file))
- if isinstance(self.repo[objname], pygit2.Blob):
- db.append(objname)
-
def register_request(self, request):
log.info("Registering request %s" % (str(request.id)))
self.registry.register(request)
@@ -42,9 +34,7 @@ def free_request(self, request):
self.registry.free(request)
def objects(self):
- db = []
- os.path.walk(os.path.join(self.repo.path, "objects"), self._build_objects, db)
- return db
+ return list(self.repo)
def get_user(self, name):
return User(name, self)

0 comments on commit 0a2ed3c

Please sign in to comment.