Skip to content

Commit de73472

Browse files
authored
Dictionary changed size during iteration (fsspec#893)
In multithreaded mode the input list can be modified.
1 parent 8722684 commit de73472

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fsspec/implementations/memory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def ls(self, path, detail=False, **kwargs):
4646
paths = set()
4747
starter = path + "/"
4848
out = []
49-
for p2 in self.store:
49+
for p2 in tuple(self.store):
5050
if p2.startswith(starter):
5151
if "/" not in p2[len(starter) :]:
5252
# exact child

0 commit comments

Comments
 (0)