]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
webish.DirnodeWalkerMixin: comment out the code that demonstrates what we
authorBrian Warner <warner@allmydata.com>
Fri, 13 Jul 2007 06:28:09 +0000 (23:28 -0700)
committerBrian Warner <warner@allmydata.com>
Fri, 13 Jul 2007 06:28:09 +0000 (23:28 -0700)
would do if we could just use generators, since we don't use it.

src/allmydata/webish.py

index 943c30b8a76f47468502aedd140cdeb41382ff54..2da53fd8cec4e4e35ca11db05c1e04b148043c50 100644 (file)
@@ -322,18 +322,18 @@ class DirnodeWalkerMixin:
     fired.
     """
 
-    def _walk_if_we_could_use_generators(self, rootnode, rootpath=()):
-        # this is what we'd be doing if we didn't have the Deferreds and thus
-        # could use generators
-        yield rootpath, rootnode
-        for childname, childnode in rootnode.list().items():
-            childpath = rootpath + (childname,)
-            if IFileNode.providedBy(childnode):
-                yield childpath, childnode
-            elif IDirectoryNode.providedBy(childnode):
-                for res in self._walk_if_we_could_use_generators(childnode,
-                                                                 childpath):
-                    yield res
+##    def _walk_if_we_could_use_generators(self, rootnode, rootpath=()):
+##        # this is what we'd be doing if we didn't have the Deferreds and
+##        # thus could use generators
+##        yield rootpath, rootnode
+##        for childname, childnode in rootnode.list().items():
+##            childpath = rootpath + (childname,)
+##            if IFileNode.providedBy(childnode):
+##                yield childpath, childnode
+##            elif IDirectoryNode.providedBy(childnode):
+##                for res in self._walk_if_we_could_use_generators(childnode,
+##                                                                 childpath):
+##                    yield res
 
     def walk(self, rootnode, visitor, rootpath=()):
         d = rootnode.list()