Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: logger masked in topotest.py #17157

Merged

Conversation

liambrady
Copy link
Contributor

In the cases where sysctl_assure() or sysctl_atleast() catch an error, the previous declaration of the local variable logger masks the global variable also called logger and prevents the error from being gracefully handled. Instead, the local logger is referenced before assignment which throws an unhandled error. The name of the local logger is changed to avoid this unintended behavior.

a local logger masks the global logger and prevents errors from being
gracefully handled within topotest.py

Signed-off-by: Liam Brady <lbrady@labn.net>
@frrbot frrbot bot added the tests Topotests, make check, etc label Oct 17, 2024
Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ton31337 ton31337 merged commit 5d5da52 into FRRouting:master Oct 20, 2024
14 checks passed
@Jafaral
Copy link
Member

Jafaral commented Oct 28, 2024

@Mergifyio backport dev/10.2

Copy link

mergify bot commented Oct 28, 2024

backport dev/10.2

✅ Backports have been created

Jafaral added a commit that referenced this pull request Oct 28, 2024
tests: logger masked in topotest.py (backport #17157)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport master size/XS tests Topotests, make check, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants