Skip to content

Give nice error message if turnkey_version file not found - #13

Merged
JedMeister merged 3 commits into
turnkeylinux:masterfrom
JedMeister:nice-error-msg
Jul 26, 2026
Merged

Give nice error message if turnkey_version file not found#13
JedMeister merged 3 commits into
turnkeylinux:masterfrom
JedMeister:nice-error-msg

Conversation

@JedMeister

Copy link
Copy Markdown
Member

Give nice error message rather than stacktrace when turnkey_version file not found.

@JedMeister
JedMeister requested a review from OnGle July 23, 2026 01:19

@OnGle OnGle 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!

@JedMeister

Copy link
Copy Markdown
Member Author

Just added another commit so a useful error message is given if it's a malformed string rather than a missing/invalid file.

TBH this is pretty dirty. I reckon a far superior way would be for sysversion.get_turnkey_version() to raise a TurnkeyVersionError (rather than just return None) and then capture the exception in turnkey-version. But that's for another day...

@OnGle OnGle 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!

@JedMeister
JedMeister merged commit 352463f into turnkeylinux:master Jul 26, 2026
1 check passed
@JedMeister
JedMeister deleted the nice-error-msg branch July 26, 2026 23:00
@JedMeister JedMeister mentioned this pull request Jul 27, 2026
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