@@ -867,9 +867,10 @@ async def check_schedule_job_status(self, job_id):
867867 return False
868868
869869 async def check_job_status (self , job_id ):
870- with polling_progress (
871- self .console , self .retries , "Status" , disable = self ._progress_disabled
872- ) as (progress , task_id ):
870+ with polling_progress (self .console , self .retries , "Status" , disable = self ._progress_disabled ) as (
871+ progress ,
872+ task_id ,
873+ ):
873874 for count in range (self .retries ):
874875 _url = f"{ self .host_uri } { self .manager_resource } /Jobs/{ job_id } "
875876 self .http_client .get_request .cache_clear ()
@@ -1319,9 +1320,10 @@ async def polling_host_state(self, state, equals=True):
13191320 state_str = "Not %s" % state if not equals else state
13201321 self .logger .info ("Polling for host state: %s" % state_str )
13211322 desired_state = False
1322- with polling_progress (
1323- self .console , self .retries , "Host state" , disable = self ._progress_disabled
1324- ) as (progress , task_id ):
1323+ with polling_progress (self .console , self .retries , "Host state" , disable = self ._progress_disabled ) as (
1324+ progress ,
1325+ task_id ,
1326+ ):
13251327 for count in range (self .retries ):
13261328 current_state = await self .get_power_state ()
13271329 if equals :
@@ -1338,9 +1340,10 @@ async def polling_host_state(self, state, equals=True):
13381340
13391341 async def poll_until_ready (self , check_func , description , sleep_interval = 5 , clear_cache = False ):
13401342 self .logger .info ("Polling for %s" % description )
1341- with polling_progress (
1342- self .console , self .retries , "Host state" , disable = self ._progress_disabled
1343- ) as (progress , task_id ):
1343+ with polling_progress (self .console , self .retries , "Host state" , disable = self ._progress_disabled ) as (
1344+ progress ,
1345+ task_id ,
1346+ ):
13441347 for count in range (self .retries ):
13451348 if clear_cache :
13461349 self .http_client .get_request .cache_clear ()
0 commit comments