@@ -404,24 +404,26 @@ def async_update_records(self, zc: 'Zeroconf', now: float_, records: List[Record
404404 This method will be run in the event loop.
405405 """
406406 for record_update in records :
407- record , old_record = record_update
407+ record = record_update [0 ]
408+ old_record = record_update [1 ]
408409 record_type = record .type
409410
410411 if record_type is _TYPE_PTR :
411412 if TYPE_CHECKING :
412413 record = cast (DNSPointer , record )
413- for type_ in self .types .intersection (cached_possible_types (record .name )):
414+ pointer = record
415+ for type_ in self .types .intersection (cached_possible_types (pointer .name )):
414416 if old_record is None :
415- self ._enqueue_callback (SERVICE_STATE_CHANGE_ADDED , type_ , record .alias )
416- elif record .is_expired (now ):
417- self ._enqueue_callback (SERVICE_STATE_CHANGE_REMOVED , type_ , record .alias )
417+ self ._enqueue_callback (SERVICE_STATE_CHANGE_ADDED , type_ , pointer .alias )
418+ elif pointer .is_expired (now ):
419+ self ._enqueue_callback (SERVICE_STATE_CHANGE_REMOVED , type_ , pointer .alias )
418420 else :
419- expire_time = record .get_expiration_time (_EXPIRE_REFRESH_TIME_PERCENT )
421+ expire_time = pointer .get_expiration_time (_EXPIRE_REFRESH_TIME_PERCENT )
420422 self .reschedule_type (type_ , now , expire_time )
421423 continue
422424
423425 # If its expired or already exists in the cache it cannot be updated.
424- if old_record or record .is_expired (now ):
426+ if old_record or record .is_expired (now ) is True :
425427 continue
426428
427429 if record_type in _ADDRESS_RECORD_TYPES :
0 commit comments