20750: Fix documentation link typo
[arvados.git] / doc / sdk / python / cookbook.html.textile.liquid
index f2d087625e662347d44f2b458159c97a926dfe2b..c9e1f05f17567a76c362c4b7d5968a0d3352854a 100644 (file)
@@ -471,17 +471,16 @@ import collections
 import pathlib
 root_collection = arvados.collection.Collection(...)
 # Start work from the base stream.
-stream_queue = collections.deque(['.'])
+stream_queue = collections.deque([pathlib.PurePosixPath('.')])
 while stream_queue:
-    stream_name = stream_queue.popleft()
-    collection = root_collection.find(stream_name)
+    stream_path = stream_queue.popleft()
+    collection = root_collection.find(str(stream_path))
     for item_name in collection:
         try:
             my_file = collection.open(item_name)
         except IsADirectoryError:
             # item_name refers to a stream. Queue it to walk later.
-            stream_path = pathlib.Path(stream_name, item_name)
-            stream_queue.append(stream_path.as_posix())
+            stream_queue.append(stream_path / item_name)
             continue
         with my_file:
             ...  # Work with my_file as desired