Skip to content

Conversation

@2timesjay
Copy link

Issue: #507

Handle KeyError that occurs in edge cases by changing instances of self.statistics[key] += ... to self.statistics[key] = self.statistics.get(key, ...) + ...

This will eliminate keyerrors.

In the cases where statistics isn't initialized with begin(), this will still not ensure that it's correct, but will ensure that we retry instead of crashing.

Alternately,

            self.statistics["idle_for"] = rs.idle_for
            self.statistics["attempt_number"] = rs.attempt_number

might be more accurate.

@mergify
Copy link
Contributor

mergify bot commented Jan 14, 2025

⚠️ No release notes detected. Please make sure to use reno to add a changelog entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant