diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py index 524b30ea28d3..059d42d9f33e 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py @@ -265,12 +265,9 @@ async def close_handles( timeout=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> Any + # type: (...) -> int """Close open file handles. - This operation may not finish with a single call, so a long-running poller - is returned that can be used to wait until the operation is complete. - :param handle: Optionally, a specific handle to close. The default value is '*' which will attempt to close all open handles. @@ -280,8 +277,8 @@ async def close_handles( its files, its subdirectories and their files. Default value is False. :param int timeout: The timeout parameter is expressed in seconds. - :returns: A long-running poller to get operation status. - :rtype: ~azure.core.polling.LROPoller + :returns: The number of file handles that were closed. + :rtype: int """ try: handle_id = handle.id # type: ignore @@ -301,7 +298,7 @@ async def close_handles( process_storage_error(error) polling_method = CloseHandlesAsync(self._config.copy_polling_interval) - return async_poller( + return await async_poller( command, start_close, None, diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py index c5493ca350d1..29bd299d3dcf 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py @@ -876,20 +876,17 @@ async def close_handles( timeout=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> Any + # type: (...) -> int """Close open file handles. - This operation may not finish with a single call, so a long-running poller - is returned that can be used to wait until the operation is complete. - :param handle: Optionally, a specific handle to close. The default value is '*' which will attempt to close all open handles. :type handle: str or ~azure.storage.file.Handle :param int timeout: The timeout parameter is expressed in seconds. - :returns: A long-running poller to get operation status. - :rtype: ~azure.core.polling.LROPoller + :returns: The number of file handles that were closed. + :rtype: int """ try: handle_id = handle.id # type: ignore @@ -909,4 +906,4 @@ async def close_handles( process_storage_error(error) polling_method = CloseHandlesAsync(self._config.copy_polling_interval) - return async_poller(command, start_close, None, polling_method) + return await async_poller(command, start_close, None, polling_method)