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

Fix vagrant output parsing #93

Merged
merged 2 commits into from
Mar 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions vagrant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,9 +938,8 @@ def _parse_machine_readable_output(self, output):
# vagrant 1.8 adds additional fields that aren't required,
# and will break parsing if included in the status lines.
# filter them out pending future implementation.
parsed_lines = list(
filter(lambda x: x[2] not in ["metadata", "ui", "action"], parsed_lines)
)
unneeded_kind = ["metadata", "ui", "action", "Description", "box-info"]
parsed_lines = list(filter(lambda x: x[2] not in unneeded_kind, parsed_lines))
return parsed_lines

def _parse_config(self, ssh_config):
Expand Down