Skip to content

Commit 0a0046a

Browse files
committed
fix: address feedback
1 parent c5deaa3 commit 0a0046a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

hcloud/actions/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def wait_until_finished(
3030
"""Wait until the specific action has status=finished.
3131
3232
:param max_retries: int Specify how many retries will be performed before an ActionTimeoutException will be raised.
33+
:param timeout: Timeout in seconds before an ActionTimeoutException will be raised.
3334
:raises: ActionFailedException when action is finished with status==error
3435
:raises: ActionTimeoutException when Action is still in status==running after max_retries or timeout is reached.
3536
"""
@@ -207,7 +208,8 @@ def wait_for_function(
207208
# pylint: disable=protected-access
208209
if wait(self._client._poll_interval_func(retries)):
209210
raise ActionGroupException(
210-
[ActionTimeoutException(action=action) for action in running]
211+
failed=[ActionTimeoutException(action) for action in running],
212+
completed=completed,
211213
)
212214

213215
retries += 1

hcloud/actions/domain.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ class ActionTimeoutException(ActionException):
103103
class ActionGroupException(HCloudException):
104104
"""An exception for a group of actions"""
105105

106-
def __init__(self, exceptions: list[ActionException]):
106+
def __init__(
107+
self,
108+
failed: list[ActionException],
109+
completed: list[BoundAction] | None = None,
110+
):
107111
super().__init__("Multiple pending actions failed")
108-
self.exceptions = exceptions
112+
self.failed = failed
113+
self.completed = completed

0 commit comments

Comments
 (0)