File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010from urllib .parse import urljoin
1111
1212import requests
13- import timeout_decorator
1413from requests import Response
14+ from timeout_decorator import timeout
1515
1616from vws ._authorization import authorization_header , rfc_1123_date
1717from vws .exceptions import (
@@ -306,7 +306,6 @@ def _wait_for_target_processed(
306306
307307 sleep (seconds_between_requests )
308308
309- @timeout_decorator .timeout (seconds = 60 * 5 )
310309 def wait_for_target_processed (
311310 self ,
312311 target_id : str ,
@@ -334,10 +333,16 @@ def wait_for_target_processed(
334333 ~vws.exceptions.UnknownTarget: The given target ID does not match a
335334 target in the database.
336335 """
337- self ._wait_for_target_processed (
338- target_id = target_id ,
339- seconds_between_requests = seconds_between_requests ,
340- )
336+ timeout_seconds = 60 * 5
337+
338+ @timeout (seconds = timeout_seconds )
339+ def decorated () -> None :
340+ self ._wait_for_target_processed (
341+ target_id = target_id ,
342+ seconds_between_requests = seconds_between_requests ,
343+ )
344+
345+ decorated ()
341346
342347 def list_targets (self ) -> List [str ]:
343348 """
You can’t perform that action at this time.
0 commit comments