-
Notifications
You must be signed in to change notification settings - Fork 659
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
SONiC installer - fix string formatting during image type check #1197
Conversation
sonic_installer/main.py
Outdated
click.echo("Image file '{}' is of a different type than running image.\n".format(url) +\ | ||
"If you are sure you want to install this image, use -f|--force.\n" +\ | ||
"Aborting...") |
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.
Are the backslashes necessary, since the entire statement is enclosed in parentheses?
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.
Removed them. They were redundant.
Retest this please |
2 similar comments
Retest this please |
Retest this please |
@jleveque do you approve to merge this with the test errors that are seen? |
It looks like the test failures are completely unrelated, but let's try once more. |
Retest this please. |
- What I did
sonic_installer
error message misses the filename due to string formatting error.This fixes the missing string substitution in the message:
Before (note that {} is missing the variable name.):
Now:
- How I did it
- How to verify it
Verified in a DUT, the error message is now printed correctly.
- Previous command output (if the output of a command-line utility has changed)
- New command output (if the output of a command-line utility has changed)