-
Notifications
You must be signed in to change notification settings - Fork 90
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
catch detect failing to parse json #243
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit about unnecessary exception object assignments, but otherwise, looks good to me :)
@platform[:release] = eos_ver['version'] | ||
@platform[:arch] = eos_ver['architecture'] | ||
true | ||
rescue JSON::ParserError => _ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't even need the assignment here, can just be rescue JSON::ParserError
.
@platform[:release] = eos_ver['version'] | ||
@platform[:arch] = eos_ver['architecture'] | ||
true | ||
rescue JSON::ParserError => _ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't even need the assignment here, can just be rescue JSON::ParserError
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
force of habit 😁
removed it and updated the PR
This may happen if the exit code is incorrect or the results get scrambled Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
736c9b2
to
fb94b5d
Compare
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
fb94b5d
to
3e9e212
Compare
* catch detect failing to parse json This may happen if the exit code is incorrect or the results get scrambled Signed-off-by: Dominik Richter <dominik.richter@gmail.com> * remove variable assignment Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This may happen if the exit code is incorrect or the results get scrambled
Signed-off-by: Dominik Richter dominik.richter@gmail.com