mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-27 06:20:25 +00:00
webish.DirnodeWalkerMixin: comment out the code that demonstrates what we
would do if we could just use generators, since we don't use it.
This commit is contained in:
parent
032dfc5e58
commit
798b714bef
@ -322,18 +322,18 @@ class DirnodeWalkerMixin:
|
|||||||
fired.
|
fired.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _walk_if_we_could_use_generators(self, rootnode, rootpath=()):
|
## 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
|
## # this is what we'd be doing if we didn't have the Deferreds and
|
||||||
# could use generators
|
## # thus could use generators
|
||||||
yield rootpath, rootnode
|
## yield rootpath, rootnode
|
||||||
for childname, childnode in rootnode.list().items():
|
## for childname, childnode in rootnode.list().items():
|
||||||
childpath = rootpath + (childname,)
|
## childpath = rootpath + (childname,)
|
||||||
if IFileNode.providedBy(childnode):
|
## if IFileNode.providedBy(childnode):
|
||||||
yield childpath, childnode
|
## yield childpath, childnode
|
||||||
elif IDirectoryNode.providedBy(childnode):
|
## elif IDirectoryNode.providedBy(childnode):
|
||||||
for res in self._walk_if_we_could_use_generators(childnode,
|
## for res in self._walk_if_we_could_use_generators(childnode,
|
||||||
childpath):
|
## childpath):
|
||||||
yield res
|
## yield res
|
||||||
|
|
||||||
def walk(self, rootnode, visitor, rootpath=()):
|
def walk(self, rootnode, visitor, rootpath=()):
|
||||||
d = rootnode.list()
|
d = rootnode.list()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user