Skip to content

Commit

Permalink
Restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Aug 28, 2023
1 parent 1bdc46e commit 805b57a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions scripts/py_matter_yamltests/matter_yamltests/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,14 +737,14 @@ def post_process_response(self, received_responses):
if self.is_event:
last_event_number = self._get_last_event_number(received_responses)
if last_event_number:
if 'LastReceivedEventNumber' in self._runtime_config_variable_storage:
if self._runtime_config_variable_storage['LastReceivedEventNumber'] > last_event_number:
logging.warning(
"Received an older event than expected: received %r < %r",
last_event_number,
self._runtime_config_variable_storage['LastReceivedEventNumber']
)
self._runtime_config_variable_storage['LastReceivedEventNumber'] = last_event_number
if 'LastReceivedEventNumber' in self._runtime_config_variable_storage:
if self._runtime_config_variable_storage['LastReceivedEventNumber'] > last_event_number:
logging.warning(
"Received an older event than expected: received %r < %r",
last_event_number,
self._runtime_config_variable_storage['LastReceivedEventNumber']
)
self._runtime_config_variable_storage['LastReceivedEventNumber'] = last_event_number

if self.wait_for is not None:
self._response_cluster_wait_validation(received_responses, result)
Expand Down Expand Up @@ -1199,7 +1199,8 @@ def __apply_legacy_config(self, config):
self.__apply_legacy_config_if_missing(config, 'timeout', 90)

# These values are default runtime values (non-legacy)
self.__apply_legacy_config_if_missing(config, 'LastReceivedEventNumber', 0)
self.__apply_legacy_config_if_missing(
config, 'LastReceivedEventNumber', 0)

def __apply_legacy_config_if_missing(self, config, key, value):
if key not in config:
Expand Down

0 comments on commit 805b57a

Please sign in to comment.