mirror of
https://github.com/arabianq/viking-file-python.git
synced 2026-04-27 22:21:21 +00:00
fixed list_all_files() for async client
This commit is contained in:
@@ -5,6 +5,7 @@ import os
|
||||
from pathlib import Path
|
||||
from warnings import deprecated
|
||||
|
||||
from itertools import chain
|
||||
import aiofiles
|
||||
from aiohttp import ClientSession, ClientResponse
|
||||
from aiohttp.client_exceptions import ContentTypeError
|
||||
@@ -222,6 +223,7 @@ class AsyncVikingClient:
|
||||
tasks.append(asyncio.create_task(self.list_files(page, path)))
|
||||
|
||||
files = await asyncio.gather(*tasks)
|
||||
files = list(chain.from_iterable(files))
|
||||
|
||||
return files
|
||||
|
||||
|
||||
Reference in New Issue
Block a user