@@ -443,10 +443,18 @@ def check_sync_check_response() -> bool:
443443 return False
444444 pattern = r"\d+[-]\d+[-]\d+"
445445 if not re .match (pattern , response_text ):
446- LOG .warning (
447- "Unexpected sync check format" ,
448- )
449- self ._pulse_connection .check_login_errors ((code , response_text , url ))
446+ warning_msg = "Unexpected sync check format"
447+ try :
448+ self ._pulse_connection .check_login_errors (
449+ (code , response_text , url )
450+ )
451+ except Exception as ex :
452+ warning_msg += f": { ex } "
453+ raise
454+ else :
455+ warning_msg += ": skipping"
456+ finally :
457+ LOG .warning (warning_msg )
450458 return False
451459 split_text = response_text .split ("-" )
452460 if int (split_text [0 ]) > 9 or int (split_text [1 ]) > 9 :
@@ -523,17 +531,17 @@ async def shutdown_task(ex: Exception):
523531 msg = ", ignoring..."
524532 LOG .debug ("Pulse sync check query failed due to %s%s" , e , msg )
525533 continue
526- except (
527- PulseServiceTemporarilyUnavailableError ,
528- PulseNotLoggedInError ,
529- ) as e :
530- if isinstance ( e , PulseServiceTemporarilyUnavailableError ) :
531- status = "temporarily unavailable"
532- else :
533- status = "not logged in"
534- LOG . error ( "Pulse service %s, ending %s task" , status , task_name )
535- await shutdown_task ( e )
536- return
534+ except PulseServiceTemporarilyUnavailableError as e :
535+ LOG . error ( "Pulse sync check query failed due to %s" , e )
536+ self . _set_update_exception ( e )
537+ continue
538+ except PulseNotLoggedInError :
539+ LOG . info (
540+ "Pulse sync check query failed due to not logged in, relogging in..."
541+ )
542+ await self . _pulse_connection . quick_logout ( )
543+ await self . _login_looped ( task_name )
544+ continue
537545 if not handle_response (
538546 code , url , logging .WARNING , "Error querying ADT sync"
539547 ):
@@ -548,7 +556,9 @@ async def shutdown_task(ex: Exception):
548556 else :
549557 have_updates = check_sync_check_response ()
550558 except PulseNotLoggedInError :
551- LOG .info ("Pulse sync check indicates logged out, re-logging in...." )
559+ LOG .info (
560+ "Pulse sync check text indicates logged out, re-logging in...."
561+ )
552562 await self ._pulse_connection .quick_logout ()
553563 await self ._login_looped (task_name )
554564 except (
0 commit comments