def _scanDirectory(self, dirIter, f):
        while len(f) < 250:
            try:
                info = dirIter.next()
            except __HOLE__:
                if not f:
                    raise EOFError
                return f
            if isinstance(info, defer.Deferred):
                info.addCallback(self._cbScanDirectory, dirIter, f)
                return
            else:
                f.append(info)
        return f
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/conch/ssh/filetransfer.py/FileTransferServer._scanDirectory