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

dhcp client: don't crash if the interface does not exist, print an error message instead #1325

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

etene
Copy link
Collaborator

@etene etene commented Mar 20, 2025

No description provided.

@etene etene self-assigned this Mar 20, 2025
@svinota
Copy link
Owner

svinota commented Mar 20, 2025

@etene what's the reason is behind this decision?

@etene
Copy link
Collaborator Author

etene commented Mar 20, 2025

@etene what's the reason is behind this decision?

Since I didn't check properly for the interface to exist, if the client was started with an invalid interface, it would just crash and print the python traceback for an IndexError.

We needed to have a simple exception to catch in these cases for our uses, plus the cli now prints a useful error instead of a traceback with an obscure generic exception.

@svinota svinota merged commit e6a51b5 into master Mar 20, 2025
23 checks passed
@svinota
Copy link
Owner

svinota commented Mar 20, 2025

Thanks a lot!

@etene
Copy link
Collaborator Author

etene commented Mar 21, 2025

Thanks for merging !

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.

2 participants