Skip to content

Commit 7202c17

Browse files
Pijukatelvdusek
andauthored
Update src/apify/_actor.py
Co-authored-by: Vlada Dusek <[email protected]>
1 parent c11b5d7 commit 7202c17

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/apify/_actor.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -735,12 +735,14 @@ async def start(
735735

736736
if timeout == 'RemainingTime':
737737
actor_start_timeout = self._get_remaining_time()
738-
elif isinstance(timeout, str):
738+
elif timeout is None:
739+
actor_start_timeout = None
740+
elif isinstance(timeout, timedelta):
741+
actor_start_timeout = timeout
742+
else:
739743
raise ValueError(
740-
f'`timeout` can be `None`, `RemainingTime` literal or `timedelta` instance, but is {timeout=}'
744+
f'Invalid timeout {timeout!r}: expected `None`, `"RemainingTime"`, or a `timedelta`.'
741745
)
742-
else:
743-
actor_start_timeout = timeout
744746

745747
api_result = await client.actor(actor_id).start(
746748
run_input=run_input,

0 commit comments

Comments
 (0)