File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 22Custom exceptions for Vuforia errors.
33"""
44
5- from func_timeout .exceptions import FunctionTimedOut
65import json
76from urllib .parse import urlparse
87
Original file line number Diff line number Diff line change 1111from urllib .parse import urljoin
1212
1313import requests
14+ from func_timeout import func_set_timeout
15+ from func_timeout .exceptions import FunctionTimedOut
1416from requests import Response
15- from timeout_decorator import timeout
1617from vws_auth_tools import authorization_header , rfc_1123_date
1718
1819from vws ._result_codes import raise_for_result_code
@@ -321,17 +322,17 @@ def wait_for_target_processed(
321322 time sent to Vuforia.
322323 """
323324
324- @timeout (
325- seconds = timeout_seconds ,
326- timeout_exception = TargetProcessingTimeout ,
327- )
325+ @func_set_timeout (timeout = timeout_seconds )
328326 def decorated () -> None :
329327 self ._wait_for_target_processed (
330328 target_id = target_id ,
331329 seconds_between_requests = seconds_between_requests ,
332330 )
333331
334- decorated ()
332+ try :
333+ decorated ()
334+ except FunctionTimedOut :
335+ raise TargetProcessingTimeout
335336
336337 def list_targets (self ) -> List [str ]:
337338 """
You can’t perform that action at this time.
0 commit comments