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

SONiC installer - fix string formatting during image type check #1197

Merged
merged 2 commits into from
Nov 4, 2020
Merged
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions sonic_installer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,9 @@ def install(url, force, skip_migration=False):
else:
# Verify that the binary image is of the same type as the running image
if not bootloader.verify_binary_image(image_path) and not force:
click.echo("Image file '{}' is of a different type than running image.\n"
"If you are sure you want to install this image, use -f|--force.\n"
"Aborting...".format(image_path))
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...")
Copy link
Contributor

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?

Copy link
Contributor Author

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.

raise click.Abort()

click.echo("Installing image {} and setting it as default...".format(binary_image_version))
Expand Down