Skip to content

cli: fix crash on LibNetplanException#286

Merged
slyon merged 3 commits into
mainfrom
slyon/error.u.c-crash
Jul 26, 2022
Merged

cli: fix crash on LibNetplanException#286
slyon merged 3 commits into
mainfrom
slyon/error.u.c-crash

Conversation

@slyon

@slyon slyon commented Jul 6, 2022

Copy link
Copy Markdown
Contributor

Description

Catch exception on config error (LibNetplanException from the libnetplan YAML parser) to exit gracefully on error, without applying any configuration. Display the parsing error on stderr.

As observed via https://errors.ubuntu.com/problem/2f11b72a6028059267c77dc94cfd3c4028cf58ac

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

@slyon
slyon force-pushed the slyon/error.u.c-crash branch from 67e7413 to a54f0a1 Compare July 20, 2022 16:18
@slyon
slyon marked this pull request as ready for review July 20, 2022 16:20
@slyon
slyon requested a review from sil2100 July 21, 2022 07:54

@dbungert dbungert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As this is my first view of the netplan code I'm not certain about the feedback, but I have a couple questions to consider.

Comment thread netplan/cli/commands/try_command.py Outdated
@slyon

slyon commented Jul 26, 2022

Copy link
Copy Markdown
Contributor Author

Thanks for your feedback @dbungert!

I think I addressed all of your comments. Is there anything to add from your side? IMO this is ready to be merged.

@slyon
slyon requested a review from dbungert July 26, 2022 09:01

@dbungert dbungert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@slyon
slyon merged commit e11e0ac into main Jul 26, 2022
@slyon
slyon deleted the slyon/error.u.c-crash branch July 26, 2022 14:27
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