Skip to content

Commit

Permalink
fix: un-awaited method (#159)
Browse files Browse the repository at this point in the history
Co-authored-by: skshetry <[email protected]>
  • Loading branch information
CNLHC and skshetry authored Jan 29, 2025
1 parent 8e0892f commit 92519d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ossfs/async_oss.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Code of AioOSSFileSystem
"""
import inspect
import logging
import os
import weakref
Expand Down Expand Up @@ -156,7 +157,10 @@ async def _call_oss(
if not method:
method = getattr(aiooss2, method_name)
logger.debug("CALL: %s - %s - %s", method.__name__, args, kwargs)
out = method(service, *args, **kwargs)
if inspect.iscoroutinefunction(method):
out = await method(service, *args, **kwargs)
else:
out = method(service, *args, **kwargs)
else:
logger.debug("CALL: %s - %s - %s", method.__name__, args, kwargs)
out = await method(*args, **kwargs)
Expand Down

0 comments on commit 92519d0

Please sign in to comment.