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

Handle None value in nmcli tables #648

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

diegobfernandez
Copy link

Fix for #428

There is no need to have another function as nmcli device wifi list returns a table that sparse_table_parse is already able to parse. The problem is _normalize_value is not handling None and failing when trying to call value.strip().

Short-circuit _normalize_value if value is None.

I did not added any tests because I couldn't setup the project, I've simply copied nmcli.py into $HOME/.local/share/jc/jcparsers and tested this change with that.

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