File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -176,14 +176,14 @@ def set_alert_state(
176
176
177
177
@skip_if_failed ("_aborted" , "_suppress_errors" , [])
178
178
def list_tags (self ) -> list [dict [str , typing .Any ]]:
179
- #TODO: Tag retrieval not implemented for offline running
179
+ # TODO: Tag retrieval not implemented for offline running
180
180
raise NotImplementedError (
181
181
"Retrieval of current tags is not implemented for offline running"
182
182
)
183
-
183
+
184
184
@skip_if_failed ("_aborted" , "_suppress_errors" , True )
185
185
def get_abort_status (self ) -> bool :
186
- #TODO: Abort on failure not implemented for offline running
186
+ # TODO: Abort on failure not implemented for offline running
187
187
return True
188
188
189
189
@skip_if_failed ("_aborted" , "_suppress_errors" , [])
Original file line number Diff line number Diff line change @@ -466,26 +466,30 @@ def check_token(self) -> bool:
466
466
self ._error ("Token has expired" )
467
467
return False
468
468
return True
469
-
469
+
470
470
@skip_if_failed ("_aborted" , "_suppress_errors" , False )
471
471
def get_abort_status (self ) -> bool :
472
472
logger .debug ("Retrieving alert status" )
473
473
474
474
try :
475
- response = get (
476
- f"{ self ._url } /api/runs/{ self ._id } /abort" , self ._headers_mp
477
- )
475
+ response = get (f"{ self ._url } /api/runs/{ self ._id } /abort" , self ._headers_mp )
478
476
except Exception as err :
479
477
self ._error (f"Exception retrieving abort status: { str (err )} " )
480
478
return False
481
479
482
- logger .debug ("Got status code %d when checking abort status" , response .status_code )
480
+ logger .debug (
481
+ "Got status code %d when checking abort status" , response .status_code
482
+ )
483
483
484
484
if response .status_code == 200 :
485
485
if (status := response .json ().get ("status" )) is None :
486
- self ._error (f"Expected key 'status' when retrieving abort status { response .json ()} " )
486
+ self ._error (
487
+ f"Expected key 'status' when retrieving abort status { response .json ()} "
488
+ )
487
489
return False
488
490
return status
489
491
490
- self ._error (f"Got status code { response .status_code } when checking abort status" )
492
+ self ._error (
493
+ f"Got status code { response .status_code } when checking abort status"
494
+ )
491
495
return False
You can’t perform that action at this time.
0 commit comments